Esempio n. 1
0
 private void LoginComplete(string user)
 {
     Application.Current.Dispatcher.Invoke(() =>
     {
         var mainViewModel = new MainViewModel(chat);
         WindowService.ShowWindow(mainViewModel);
         WindowService.CloseWindow(this);
     });
 }
        public static void Kill()
        {
            Instant  startTime = SystemClock.Instance.GetCurrentInstant();
            Duration elapsedTime;
            // ReSharper disable once SuggestVarOrType_SimpleTypes
            IntPtr dialog;

            do
            {
                dialog      = WindowService.FindWindow(AsusErrorMessageClassName, AsusErrorMessageWindowName);
                elapsedTime = SystemClock.Instance.GetCurrentInstant() - startTime;
                Thread.Sleep(TimeSpan.FromMilliseconds(25));
            } while ((elapsedTime < Duration.FromMinutes(5)) && (WindowService.WindowIsPresent(dialog) == false));


            while (WindowService.IsOpen(dialog))
            {
                WindowService.CloseWindow(dialog);
                Thread.Sleep(TimeSpan.FromMilliseconds(25));
            }

            ConfirmedDialogClosedOrNotPresent = true;
        }
Esempio n. 3
0
 /// <summary>
 /// Закрывает окно с параметрами
 /// </summary>
 private void SaveStepSettings(object obj)
 {
     WindowService.CloseWindow(this, true);
 }