Ejemplo n.º 1
0
 public void ConfirmNavigationRequest(NavigationContext navigationContext, Action<bool> continuationCallback)
 {
     if (this._service.EntityContainer.HasChanges)
     {
         this._confirmExitInteractionRequest.Raise(new ConfirmViewModel { ConfirmContent = UniCloud.Infrastructure.CAFMStrings.ConfirmNavigateAwayFromRequestDetail, ConfirmTitle = UniCloud.Infrastructure.CAFMStrings.ConfirmNavigateAwayFromRequestDetailTitle },
             c =>
             {
                 if (c.Result)
                 {
                     this._service.RejectChanges();
                     continuationCallback(true);
                 }
                 else
                 {
                     continuationCallback(false);
                     var navigation = new MessageOperationLibrary.Events.NavigationEvent(false);
                     MessageEventAggregatorRepository.EventAggregator.Publish<MessageOperationLibrary.Events.NavigationEvent>(navigation);
                 }
             });
     }
     else
     {
         continuationCallback(true);
     }
 }
Ejemplo n.º 2
0
 private void OnSendOprationNavigation(NavigationEvent e)
 {
     if (e.IsSkip == true)
     {
         if (navigationJournal == null)
             navigationJournal = regionManager.Regions[RegionNames.MainRegion].NavigationService.Journal;
         if (navigationJournal != null)
         {
             if (navigationJournal.CanGoBack)
             {
                 navigationJournal.GoBack();
             }
             else
             {
                 Uri uri = new Uri("HomeView", UriKind.Relative);
                 this.regionManager.RequestNavigate(RegionNames.MainRegion, uri);
             }
             this.FuncName = lastFuncName;
         }
     }
     else
     {
         this.FuncName = lastFuncName;
     }
 }