예제 #1
0
 private void buttonRestart_Click(object sender, RoutedEventArgs e)
 {
     OrderEntryCommands.ExecuteLogoutCommand();
     User32.ExitWindowsEx(2, 0);
     App.SwitchToDefaultDesktopOnClose = true;
     App.ShutdownApplication(false);
 }
예제 #2
0
        private void buttonExitAll_Click(object sender, RoutedEventArgs e)
        {
            OrderEntryCommands.ExecuteLogoutCommand();
            var ownerWindow = (Window.GetWindow(this) as IShadeable);

            _notification = ActionNotificationControl.Create(ownerWindow,
                                                             Strings.ExitStoppingSql, Strings.Notification);
            _notification.Show();
            var thread = new Thread(ServiceStopThreadStart);

            thread.Start(thread);
        }
예제 #3
0
 private void buttonRestartProgram_Click(object sender, RoutedEventArgs e)
 {
     OrderEntryCommands.ExecuteLogoutCommand();
     //Desktop temposDesktop = Desktop.OpenDesktop("TemposDesktop");
     if (App.IsUsingDesktop && !LocalSetting.Values.Boolean["KioskMode"])
     {
         Desktop.Default.CreateProcess(Application.ResourceAssembly.Location, "/RESTART");
         App.SwitchToDefaultDesktopOnClose = true;
     }
     else
     {
         VistaSecurity.Restart("/RESTART");
         App.SwitchToDefaultDesktopOnClose = false;
     }
     App.ShutdownApplication();
 }
예제 #4
0
 private void buttonSuspend_Click(object sender, RoutedEventArgs e)
 {
     OrderEntryCommands.ExecuteLogoutCommand();
     Powrprof.SetSuspendState(false, true, false);
 }
예제 #5
0
 private void buttonLockWorkstation_Click(object sender, RoutedEventArgs e)
 {
     OrderEntryCommands.ExecuteLogoutCommand();
     User32.LockWorkStation();
 }
예제 #6
0
 private void buttonExitProgram_Click(object sender, RoutedEventArgs e)
 {
     OrderEntryCommands.ExecuteLogoutCommand();
     App.SwitchToDefaultDesktopOnClose = true;
     App.ShutdownApplication();
 }