Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 private void monitorOff_Click(object sender, RoutedEventArgs e)
 {
     PowerHelpers.TurnOffMonitor();
 }