Пример #1
0
 public AutoShutdownerApp(MainWindow window)
 {
     _window = window;
     _shutdown = new Shutdowner(window);
     _shower.Elapsed += showMe;
     _shower.Interval = ShowAfterInterval;
     _shower.Stop();
     _notifyIcon.Click += (object sender, EventArgs e) => { showMe(null, null); };
     _notifyIcon.Icon = AutoShutdowner.Properties.Resources.MainIcon;
     _shutdown.Enable = true;
 }
Пример #2
0
 public Shutdowner(MainWindow window)
 {
     _window = window;
     _shutdowner.Elapsed += (object sender, ElapsedEventArgs e) => { Shutdown(); };
 }