Beispiel #1
0
 private void ExitApp(object sender, EventArgs e)
 {
     UsbOps.StopUsbTimer();
     timerUI.Dispose();
     trayIcon.Dispose();
     eventlog.Info("Приложение закрыто");
     App.Current.Shutdown();
 }
 public static void RestartComputer()
 {
     eventlog.Info("Перезагрузка компьютера");
     UsbOps.StopUsbTimer();
     ProcessingPower("shutdown", "/r /t 0");
 }
 public static void ShutdownComputer()
 {
     eventlog.Info("Выключение компьютера");
     UsbOps.StopUsbTimer();
     ProcessingPower("shutdown", "/s /t 0");
 }