예제 #1
0
        void OpenWindowCommandExecute()
        {
            if (Username == string.Empty)
            {
                MessageBoxService.ShowMessage("Wpisz Użytkownika!");
                return;
            }
            if (Password == string.Empty)
            {
                MessageBoxService.ShowMessage("Wpisz Hasło");
                return;
            }
            IHP_ZAM_USERS user = DoLogin(Username, Password);

            if (user != null)
            {
                ProgramDataSotrage.User = user;

                MainWindowService.ShowMainWindow();

                //var w = new JaednDodatPodpowiedz();
                //w.ShowDialog();

                Messenger.Default.Send <IHP_ZAM_USERS>(user);
                CurrentWindowService.Close();
            }
            else
            {
                MessageBoxService.ShowMessage("Niepoprawny Użytkownik lub Hasło!");
            }
        }
예제 #2
0
 public void Cancel()
 {
     if (ModernDialogService.Show(Properties.Resources.NotCompleted, ApplicationTitle,
                                  MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
     {
         CurrentWindowService.Close();
     }
 }
예제 #3
0
        public async Task Run(CancelEventArgs args)
        {
            args.Cancel = true;

            AsyncCommand <CancelEventArgs> defaultCommand = DefaultCommand.Command as AsyncCommand <CancelEventArgs>;

            CancelCommand.Command = defaultCommand.CancelCommand;

            await RunCore(defaultCommand.CancellationTokenSource);

            CurrentWindowService.Close();
        }
예제 #4
0
        public void Finish()
        {
            if (LaunchApplication)
            {
                try
                {
                    Process.Start(Path.Combine(SetupLocation, ProductName + ".exe"));
                }
                catch (Exception e)
                {
                    ModernDialogService.Show(e.Message, ApplicationTitle, MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }

            Utilities.SetCurrentSetupLocation(SetupLocation, ApplicationTitle);
            CurrentWindowService.Close();
        }
예제 #5
0
 private void ExecuteCloseApplication() => CurrentWindowService?.Close();
 void OnCloseWindowCommandExecute()
 {
     CurrentWindowService.Close();
 }
예제 #7
0
 public void Exit()
 {
     CurrentWindowService.Close();
 }