Exemplo n.º 1
0
 public ResultPage(Session session)
 {
     _session = session;
     // Result.Text = "Вы правильно ответили на "+ session.Score +" вопросов из 24";
     UILogic.CreateSession(session.User, session.Package, session.Score);
     InitializeComponent();
     PleaseWork.Content = "Вы правильно ответили на " + _session.Score + " вопросов из 24";
 }
Exemplo n.º 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);
                }
            }
        }