Example #1
0
        void Exit_Click(object sender, EventArgs e)
        {
            trayIcon.Visible = false;
            trayIcon.Dispose();

            pwrManager.Dispose();

            Application.Current.Shutdown();
        }
Example #2
0
        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();
        }