示例#1
0
 private void PointButtonBehavior()
 {
     if (_questionNum != _pack.Questions.Count())
     {
         _questionNum++;
         var nextQuestionPage = new GamePage(_pack, _questionNum, _session, Ppage);
         NavigationService.Navigate(nextQuestionPage);
     }
     else
     {
         var theEndPage = new ResultPage(_session);
         NavigationService.Navigate(theEndPage);
     }
 }
示例#2
0
        private void PackList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var package = PackList.SelectedItem as Package;

            if (package != null)
            {
                package.IsAlreadyPlayed = true;
                var currSession = UILogic.CreateSession(_user, package, 0);
                UILogic.AdaptPacksForUser(_user, dBRepository.Packages);
                UpdateInfo(dBRepository.Packages);
                var pop = new PopUpWindow();
                pop.ShowDialog();
                if (pop.gamemode)
                {
                    var gamepage = new GamePage(package, 1, currSession, this);
                    NavigationService.Navigate(gamepage);
                }
                else
                {
                    var questpage = new QuestionPage(package, this);
                    NavigationService.Navigate(questpage);
                }
            }
        }