private void ActivatePreventSleep() { nIcon.Visible = true; SetIcons(Properties.Resources.sun, "Prevent Sleep Active!"); SleepController.Activate(); _isActive = true; Hide(); nIcon.ShowBalloonTip(1000, "PreventSleep", "Prevent Sleep Active!", System.Windows.Forms.ToolTipIcon.Info); }
private void DeactivatePreventSleep() { SetIcons(Properties.Resources.sleep, "Prevent Sleep Deactive!"); SleepController.Deactivate(); _isActive = false; }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { nIcon.Visible = false; SleepController.Deactivate(); }