private void EnsureCanvas() { if (canvasForm == null || canvasForm.IsDisposed) { canvasForm = new GraphicsForm(buddyUid); UpdateTitle(); } canvasForm.Show(); }
private void ChatForm_FormClosing(object sender, FormClosingEventArgs e) { if (canvasForm != null && !canvasForm.IsDisposed) { canvasForm.Close(); canvasForm = null; } ChatForm _; Program.chatFormMap.TryRemove(buddyUid, out _); }