示例#1
0
 private void ContinueStartUp()
 {
     if (_notification != null)
     {
         _notification.Close();
     }
     new Thread(CheckDatabaseConnection).Start();
 }
示例#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
        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();
        }