Beispiel #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();
                }
            }
        }
        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();
                }
            }
        }
Beispiel #3
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();
                }
            }
        }
Beispiel #4
0
        private void GoingToTheNextDeveloperWindow()
        {
            Developer_III_Window developer_III_Window = new Developer_III_Window(_user, _game, _storage, _wereThereAlreadySomeChangings);

            developer_III_Window.Show();
        }