public
void
ShowChatRoom()
... {
ChatRoom room = CreateChatRoom();
if (room.InvokeRequired)
...{
EmptyMethod m = new EmptyMethod(room.Show);
this.Invoke(m);
EmptyMethod m2 = new EmptyMethod(room.BringToFront);
this.Invoke(m2);
}
else
...{
room.Show();
room.WindowState = System.Windows.Forms.FormWindowState.Normal;
room.BringToFront();
}
}
... {
ChatRoom room = CreateChatRoom();
if (room.InvokeRequired)
...{
EmptyMethod m = new EmptyMethod(room.Show);
this.Invoke(m);
EmptyMethod m2 = new EmptyMethod(room.BringToFront);
this.Invoke(m2);
}
else
...{
room.Show();
room.WindowState = System.Windows.Forms.FormWindowState.Normal;
room.BringToFront();
}
}