private async void EditTeam()
        {
            var result = await _teamService.EditTeam(SelectedTeam.TeamId, SelectedTeam);

            if (result)
            {
                _navigationService.GoBack();
            }
        }
示例#2
0
        private async void EditQuiz()
        {
            var result = await _quizService.EditQuiz(SelectedQuiz.QuizId, SelectedQuiz);

            DisableOtherQuizzes();

            if (result)
            {
                _navigationService.GoBack();
            }
        }
示例#3
0
        private async void SaveRound()
        {
            var result = await _roundService.EditRound(SelectedRound.RoundId, SelectedRound);

            if (result)
            {
                _navigationService.GoBack();
            }
        }
示例#4
0
 protected virtual void UniversalBaseViewModel_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (NavigationService.BackStackDepth == 0)
     {
         //Let the system do whatever it's supposed to
         e.Handled = false;
         return;
     }
     if (NavigationService.CanGoBack && AllowGoingBack)
     {
         NavigationService.GoBack();
         e.Handled = true;
     }
     else
     {
         e.Handled = true; //Swallow the event and do nothing
     }
 }
示例#5
0
 private void OnBackRequested(WinUI.NavigationView sender, WinUI.NavigationViewBackRequestedEventArgs args)
 {
     _navigationService.GoBack();
 }