private void MainForm_Closing(object sender, CancelEventArgs e) { // Clean up. _handler.DrawEvent -= Handler_DrawEvent; _handler.ClickEvent -= Handler_ClickEvent; _handler = null; _procHandler.DrawEvent -= ProcHandler_DrawEvent; _procHandler.ClickEvent -= ProcHandler_ClickEvent; _procHandler = null; Program.TheForm = null; }
private void OptionsForm_Closing(object sender, CancelEventArgs e) { if (_restartChanges) { MessageBox.Show(NativeLang.GetNlsString("Options", "RestartChanges")); } // Clean up. _handler.ClickEvent -= Handler2_ClickEvent; _handler.DrawEvent -= Handler2_DrawEvent; _handler = null; }