public void ClosePrivateChatFormn(PrivateChatForm privateChatForm) { privateChatForm.Invoke((MethodInvoker) delegate { privateChatForm.Close(); }); }
public PrivateChatForm CreatePrivateChatForm(Client client, string interlocutor) { var privateChatForm = new PrivateChatForm(client, interlocutor); new Thread(() => { ShowPrivateChatForm(privateChatForm); }).Start(); return(privateChatForm); }
private void ShowPrivateChatForm(PrivateChatForm privateChatForm) { privateChatForm.ShowDialog(); }