Beispiel #1
0
 private void ExecuteCancel()
 {
     if (IsFirstLaunch)
     {
         System.Windows.Application.Current.Shutdown();
     }
     else
     {
         NavService.Pop();
     }
 }
 private void ExecuteCancelCommand()
 {
     if (!_popPageOnSave)
     {
         var vm = new IdlePageViewModel(NavService);
         NavService.ShowPage(PageType.IDLE_PAGE, false, vm);
         vm.Initialize();
     }
     else
     {
         NavService.Pop();
     }
 }
 private void handleInactiveMessage(InactiveMessage msg)
 {
     if (!_popPageOnSave)
     {
         SaveForm(true);
         var vm = new IdlePageViewModel(NavService);
         NavService.ShowPage(PageType.IDLE_PAGE, false, vm);
         vm.Initialize();
     }
     else
     {
         NavService.Pop();
     }
 }
        private void ExecuteSaveCommand()
        {
            ClearErrors();
            if (ValidateForm())
            {
                if (_isManualEdit)
                {
                    Messenger.Default.Send <BusyMessage>(new BusyMessage {
                        IsBusy = true, Message = "Saving..."
                    });
                }
                SaveForm(false);
                if (_isManualEdit)
                {
                    Messenger.Default.Send <BusyMessage>(new BusyMessage {
                        IsBusy = false, Message = "Saving..."
                    });

                    if (!_popPageOnSave)
                    {
                        var vm = new IdlePageViewModel(NavService);
                        NavService.ShowPage(PageType.IDLE_PAGE, false, vm);
                        vm.Initialize();
                    }
                    else
                    {
                        NavService.Pop();
                    }
                }
                else
                {
                    var vm = new ExitScalePageViewModel(NavService);
                    NavService.ShowPage(PageType.EXIT_SCALE_PAGE, false, vm);
                    vm.Initialize();
                }
            }
        }