Ejemplo n.º 1
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (_goingForResultAfterQuestionWindow)
            {
                ResultAfterQuestionWindow resultAfterQuestionWindow = new ResultAfterQuestionWindow(
                    _testingMode, _storage, _game, _numberOfQuestionsShown,
                    _localCharacteristics, _answer, _wereThereAlreadySomeChangings);

                resultAfterQuestionWindow.Show();
            }

            else
            {
                if (!_testingMode)
                {
                    PlayingModeWindow playingModeWindow = new PlayingModeWindow(_storage);

                    _storage.CloseGame();

                    playingModeWindow.Show();
                }
                else
                {
                    Developer_III_Window developerWindow = new Developer_III_Window(
                        _storage.Users.Items.First(u => u.Id == _game.UserId), _game, _storage, _wereThereAlreadySomeChangings);
                    developerWindow.Show();
                }
            }
        }
Ejemplo n.º 2
0
        private void PlayingModeButton_Click(object sender, RoutedEventArgs e)
        {
            PlayingModeWindow playingModeWindow = new PlayingModeWindow(_storage);

            playingModeWindow.Show();

            Close();
        }
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (!_goingToPlayGame)
            {
                PlayingModeWindow playingModeWindow = new PlayingModeWindow(_storage);

                playingModeWindow.Show();
            }

            else
            {
                QuestionsWindow questionsWindow = new QuestionsWindow(false, _storage, _game, false);

                questionsWindow.Show();
            }
        }
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (_restartingTheGame)
            {
                if (_testingMode)
                {
                    QuestionsWindow questionsWindow = new QuestionsWindow(_testingMode, _storage, _game,
                                                                          _wereThereAlreadySomeChangings);
                    questionsWindow.Show();
                }
                else
                {
                    IGame game = _game;
                    game.UpdatePicture(_game.Picture);

                    UpdatePopularity();

                    DescriptionOfGameWindow discriptionOfGameWindow = new DescriptionOfGameWindow(_storage, game);

                    discriptionOfGameWindow.Show();
                }
            }

            else
            {
                if (!_testingMode)
                {
                    UpdatePopularity();

                    PlayingModeWindow playingModeWindow = new PlayingModeWindow(_storage);

                    playingModeWindow.Show();
                }
                else
                {
                    Developer_III_Window developerWindow = new Developer_III_Window(
                        _storage.Users.Items.First(u => u.Id == _game.UserId), _game,
                        _storage, _wereThereAlreadySomeChangings);
                    developerWindow.Show();
                }
            }
        }
Ejemplo n.º 5
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (_goingForward && _goingToTheEndOfTheGameWindow)
            {
                EndOfGameWindow endOfGameWindow = new EndOfGameWindow(_testingMode, _storage, _game,
                                                                      _localCharacteristics, _wereThereAlreadySomeChangings);

                endOfGameWindow.Show();
            }

            else if (_goingForward && _goingToTheNextQuestionWindow)
            {
                QuestionsWindow questionsWindow = new QuestionsWindow(_testingMode, _storage, _game,
                                                                      _numberOfQuestionsShown, _localCharacteristics, _wereThereAlreadySomeChangings);

                questionsWindow.Show();
            }

            else
            {
                if (!_testingMode)
                {
                    PlayingModeWindow playingModeWindow = new PlayingModeWindow(_storage);

                    _storage.CloseGame();

                    playingModeWindow.Show();
                }

                else
                {
                    Developer_III_Window developerWindow = new Developer_III_Window(
                        _storage.Users.Items.First(u => u.Id == _game.UserId),
                        _game, _storage, _wereThereAlreadySomeChangings);
                    developerWindow.Show();
                }
            }
        }