void PostNavigationCallback(NavigationResult navigationResult) { if (navigationResult.Result == true) System.Windows.MessageBox.Show("Navigation Successful"); else System.Windows.MessageBox.Show("Navigation Failed"); }
void CheckForError(Microsoft.Practices.Prism.Regions.NavigationResult nr) { if (nr.Result == false) { throw new Exception(nr.Error.Message); } }
/// <summary> /// Callback method invoked when navigation has completed. /// </summary> /// <param name="result">Provides information about the result of the navigation.</param> private void NavigationCompleted(NavigationResult result) { // Exit if navigation was not successful if (result.Result != true) return; // Publish ViewRequestedEvent var eventAggregator = ServiceLocator.Current.GetInstance<IEventAggregator>(); var navigationCompletedEvent = eventAggregator.GetEvent<NavigationCompletedEvent>(); navigationCompletedEvent.Publish("ModuleA"); }
/// <summary> /// Callback method invocado cuando la navegacion se ha completado. /// </summary> /// <param name="result">Proporciona información acerca del resultado de la navegación..</param> private void NavigationCompleted(NavigationResult result) { // Salimos si la navegación no se ha completado correctamente. if (result.Result != true) return; // Publicamos el ViewRequestedEvent var eventAggregator = ServiceLocator.Current.GetInstance<IEventAggregator>(); var navigationCompletedEvent = eventAggregator.GetEvent<NavigationCompletedEvent>(); navigationCompletedEvent.Publish("ModuleB"); }
public void HandleNavigationCallback(NavigationResult navigationResult) { if (navigationResult.Error != null) { messageBoxService.ShowError(("There was an error trying to display the view you requested")); } else { if (!navigationResult.Result.HasValue || !navigationResult.Result.Value) { messageBoxService.ShowError(("There was an error trying to display the view you requested")); } } }
/// <summary> /// Se ejecuta cuando se ha completado la navegación. /// </summary> /// <param name="result"> /// Indica información sobre el resultado de la navegación. /// </param> protected virtual void NavigationCompleted(NavigationResult result) { if (result.Result.HasValue && result.Result.Value) { // Propagamos el nombre del módulo activo para desactivar // los TaskButtons del resto de módulos cargados en la región TaskbarRegion. var navigationCompletedEvent = this.EventAggregator.GetEvent<NavigationCompletedEvent>(); navigationCompletedEvent.Publish(this.ModuleType.Name); } }
/// <summary> /// The navigation callback gets the view and stores a reference to it in the /// navigation settings. It also gets the data paremeter and passes it to the /// view model's by calling the Publish method. /// </summary> /// <param name="navigationResult">The navigation result.</param> private void NavigationCompleted(NavigationResult navigationResult) { if (navigationResult.Context.NavigationService.Region.Name.Equals("DocumentRegion")) { if (navigationResult.Result.HasValue && !navigationResult.Result.Value) { // Navigation has been cancelled. return; } var query = navigationResult.Context.Parameters; var navigationId = query["NavigationId"]; NavigationSettings navigationSettings; if (navigationSettingsList.TryGetValue(navigationId, out navigationSettings)) { object data = navigationSettings.Data; var view = navigationResult.Context.NavigationService.Region.Views.FirstOrDefault( v => (((DocumentViewBase)v).ViewModel.NavigationId.Equals(navigationId))); var documentView = (DocumentViewBase)view; navigationSettings.DocumentView = documentView; documentView.ViewModel.PublishData(data); return; } var message = String.Format("The navigation list does not contain a Uri for navigation id {0}.", navigationId); throw new Exception(message); } }
private void NavigationCallBack( NavigationResult navigationResult ) { if ( navigationResult.Error != null ) { if ( !( navigationResult.Error is SecurityNavigationAccessDeniedException ) ) { throw navigationResult.Error; } } }
private void NavigationCompleted(NavigationResult result) { if (result.Result == true) Events.GetEvent<ChatOnDisplayEvent>().Publish(null); }
private void NavigationCallback(NavigationResult result) { if (result != null) { if (result.Result.GetValueOrDefault(false)) { string message = string.Format(Errors.NavigationFailed, result.Context.Uri); Logger.Log(message, Category.Warn, Priority.High); if (result.Error != null) { Logger.Log(result.Error.Message, Category.Exception, Priority.High); } } } }
private void NavigationCompleted( NavigationResult navigation ) { // Called when navigation is complete. if ( navigation.Result == true ) { } }