예제 #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 ServiceStopThreadStart(object threadObject)
        {
            var thread = threadObject as Thread;

            if (thread == null)
            {
                return;
            }
            VistaSecurity.RestartElevated("/STOPSQL", true);
            Thread.Sleep(500);
            Dispatcher.Invoke((Action)(() =>
            {
                _notification.Close();
                if (!ServiceHelper.IsSqlBrowserServiceRunningLocally)
                {
                    App.SwitchToDefaultDesktopOnClose = true;
                    App.ShutdownApplication();
                }
                else
                {
                    Window window = Window.GetWindow(this);
                    if (window != null)
                    {
                        window.Close();
                    }
                }
            }));
            thread.Abort();
        }
예제 #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 DoResetCommand(string resetCommandParameters)
 {
     if (!resetCommandParameters.ToLower().Equals("system"))
     {
         return;
     }
     {
         if (PosDialogWindow.ShowDialog(
                 Types.Strings.ShellResetSystem,
                 Types.Strings.ShellResetSystemTitle, DialogButtons.YesNo) ==
             DialogButton.Yes)
         {
             ResetTransactionalTables();
             App.SwitchToDefaultDesktopOnClose = true;
             App.ShutdownApplication();
         }
     }
 }
예제 #5
0
 private void buttonExitProgram_Click(object sender, RoutedEventArgs e)
 {
     OrderEntryCommands.ExecuteLogoutCommand();
     App.SwitchToDefaultDesktopOnClose = true;
     App.ShutdownApplication();
 }