void Exit_Click(object sender, EventArgs e) { trayIcon.Visible = false; trayIcon.Dispose(); pwrManager.Dispose(); Application.Current.Shutdown(); }
void Exit_Click(object sender, EventArgs e) { _trayIcon.Visible = false; _trayIcon.Dispose(); startWatcher.Stop(); stopWatcher.Stop(); startWatcher.Dispose(); stopWatcher.Dispose(); pwrManager.Dispose(); Application.Current.Shutdown(); }