public void exit_new_leave_meth(String button_Name) { if (button_Name.Equals("Button_new_game")) { gameView.set_window_to_default(); model_main_game = new Model_Main_Game(); model_main_game.number_of_current_question = 0; try { model_main_game.Game(); } catch { throw; } var question = model_main_game.questionsList.Where(x => x.Id == model_main_game.Id_of_question).ToList().First(); gameView.Buffer_label_question_text = question.Question.ToString(); Fill_answers_buffer_labels(); } }
public Game_Presenter(IGameView _gameView) { model_main_game = new Model_Main_Game(); gameView = _gameView; try { model_main_game.Game(); } catch { throw; } var question = model_main_game.questionsList.Where(x => x.Id == model_main_game.Id_of_question).ToList().First(); gameView.Buffer_label_question_text = question.Question.ToString(); Fill_answers_buffer_labels(); gameView.exit_new_leave += exit_new_leave_meth; gameView.questions_answers += questions_Answers_meth; gameView.next_question += next_question; gameView.clues += clues_meth; }