private void buttonRestart_Click(object sender, RoutedEventArgs e) { OrderEntryCommands.ExecuteLogoutCommand(); User32.ExitWindowsEx(2, 0); App.SwitchToDefaultDesktopOnClose = true; App.ShutdownApplication(false); }
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); }
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(); }
private void buttonSuspend_Click(object sender, RoutedEventArgs e) { OrderEntryCommands.ExecuteLogoutCommand(); Powrprof.SetSuspendState(false, true, false); }
private void buttonLockWorkstation_Click(object sender, RoutedEventArgs e) { OrderEntryCommands.ExecuteLogoutCommand(); User32.LockWorkStation(); }
private void buttonExitProgram_Click(object sender, RoutedEventArgs e) { OrderEntryCommands.ExecuteLogoutCommand(); App.SwitchToDefaultDesktopOnClose = true; App.ShutdownApplication(); }