protected override void OnStartup(StartupEventArgs e) { App.icon = new NotifyIcon(); icon.Click += new EventHandler(icon_Click); icon.Icon = Insomnia.Properties.Resources.Owl; icon.Visible = true; base.OnStartup(e); // Prevent the system from sleeping PowerHelpers.EnableInsomnia(); }
private void monitorOff_Click(object sender, RoutedEventArgs e) { PowerHelpers.TurnOffMonitor(); }