예제 #1
0
 private void BeginStartup()
 {
     if ((ServiceHelper.IsSqlServiceLocal && !ServiceHelper.IsSqlServiceRunningLocally) ||
         (ServiceHelper.IsSqlBrowserServiceLocal && !ServiceHelper.IsSqlBrowserServiceRunningLocally &&
          !string.IsNullOrEmpty(LocalSetting.DatabaseServerLoginName)))
     {
         string message;
         if (!ServiceHelper.IsSqlServiceRunningLocally &&
             !ServiceHelper.IsSqlBrowserServiceLocal)
         {
             message = Types.Strings.TheSQLServiceAndSQLBrowserServiceAreNotRunningWouldYouLikeToStartThem;
         }
         else if (!ServiceHelper.IsSqlServiceRunningLocally)
         {
             message = Types.Strings.TheSQLServiceIsNotRunningWouldYouLikeToStartIt;
         }
         else
         {
             message = Types.Strings.TheSQLBrowserServiceIsNotRunningWouldYouLikeToStartIt;
         }
         if (PosDialogWindow.ShowDialog(message,
                                        Types.Strings.Warning, DialogButtons.YesNo) == DialogButton.Yes)
         {
             _notification = ActionNotificationControl.Create(null,
                                                              Types.Strings.StartingSQLServices, Types.Strings.Notification);
             _notification.Show();
             Thread thread = new Thread(ServiceStartThreadStart);
             thread.Start(thread);
             return;
         }
     }
     ContinueStartUp();
 }
예제 #2
0
        private PosDialogWindow ShowPreparingReportWindow()
        {
            ActionNotificationControl notification =
                ActionNotificationControl.Create(Window.GetWindow(this) as PosDialogWindow,
                                                 Strings.PreparingReport, Strings.Notification);

            notification.Show();
            notification.ParentWindow.Closed += ParentWindow_Closed;
            return(notification.ParentWindow);
        }
예제 #3
0
        public void PrintRegisterReport(RegisterDrawer drawer)
        {
            ActionNotificationControl notification =
                ActionNotificationControl.Create(MainWindow.Singleton,
                                                 Types.Strings.RegisterMenuPreparingReport, Types.Strings.Notification);

            notification.Show();
            notification.ParentWindow.Closed += Notification_Closed;
            ReportManager.PrintRegisterReport(drawer, ParentWindow_Closed);
            notification.Close();
        }
예제 #4
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);
        }
예제 #5
0
        private void DoFinishInstall()
        {
            bool exists = false;

            try
            {
                exists = DataModelBase.DatabaseExists("TemPOS");
            }
            catch {  }

            if (!exists)
            {
                _notification = ActionNotificationControl.Create(null,
                                                                 Types.Strings.InstallingSQLDatabase, Types.Strings.Notification);
                _notification.Show();

                new Thread(DoFinishInstallThreadStart).Start();
            }
            else
            {
                _notification = null;
                FinalStartUp();
            }
        }