Example #1
0
 private void buttonRestart_Click(object sender, RoutedEventArgs e)
 {
     OrderEntryCommands.ExecuteLogoutCommand();
     User32.ExitWindowsEx(2, 0);
     App.SwitchToDefaultDesktopOnClose = true;
     App.ShutdownApplication(false);
 }
Example #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();
        }
Example #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();
 }
 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();
         }
     }
 }
Example #5
0
 private void buttonExitProgram_Click(object sender, RoutedEventArgs e)
 {
     OrderEntryCommands.ExecuteLogoutCommand();
     App.SwitchToDefaultDesktopOnClose = true;
     App.ShutdownApplication();
 }