示例#1
0
 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);
 }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
 private async void AfterDetailDeleted(AfterDetailDeletedEventArgs args)
 {
     await DetailViewModel.LoadAsync(args.Id);
 }