private void ReturnBookWindow_FormClosing(object sender, FormClosingEventArgs e) { Console.WriteLine("ReturnBookwindow closing " + e.CloseReason); if (e.CloseReason == CloseReason.UserClosing) { controller.logout(); Application.Exit(); } }
private void ChatWindow_FormClosing(object sender, FormClosingEventArgs e) { Console.WriteLine("LibraryWindow closing " + e.CloseReason); if (e.CloseReason == CloseReason.UserClosing) { controller.logout(); controller.updateEvent -= userUpdate; Application.Exit(); } }