private async void OnOpenDetailView(OpenDetailViewEventArgs args) { if (DetailViewModel != null && DetailViewModel.HasChanges) { } switch (args.ViewModelName) { case nameof(ProjectDetailViewModel): DetailViewModel = _projectDetailViewModelCreator(); break; } await DetailViewModel.LoadAsync(args.Id); }
private async void OnOpenDetailViewAsync(OpenDetailViewEventArgs args) { if (DetailViewModel != null && DetailViewModel.HasChanges) { if (_messageDialogService.ShowOkCancelDialog("You've made changes. Navigate away?", "Question") == MessageDialogResult.Cancel) { return; } } DetailViewModel = _detailViewModelCreator[args.ViewModelName]; await DetailViewModel.LoadAsync(args.Id); }
private async void OnOpenDetailView(OpenDetailViewEventArgs args) { if (DetailViewModel != null && DetailViewModel.HasChanges) { var result = _messageDialogService.ShowOkCancelDialog("Changes were made, navigate away?", "Changes were made"); if (result == MessageDialogResult.Cancel) { return; } } switch (args.ViewModelName) { case nameof(FriendDetailViewModel): DetailViewModel = _friendDetailViewModelCreator(); break; } DetailViewModel = _friendDetailViewModelCreator(); await DetailViewModel.LoadAsync(args.Id); }
private async void AfterDetailDeleted(AfterDetailDeletedEventArgs args) { await DetailViewModel.LoadAsync(args.Id); }