コード例 #1
0
ファイル: App.xaml.cs プロジェクト: naeubanks/Insomnia
        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();
        }
コード例 #2
0
 private void monitorOff_Click(object sender, RoutedEventArgs e)
 {
     PowerHelpers.TurnOffMonitor();
 }