private void NextLevel(int round, string category = "") { Question q = QuestionService.GetRandomQuestion(category); this.Hide(); Game game = new Game(q, this.Category, round); game.Closed += (s, args) => this.Close(); game.Show(); }
// Arte e Literatura private void BttnCategoryB_Click(object sender, EventArgs e) { Question question = QuestionService.GetRandomQuestion("Arte e Literatura"); if (!VerifyQuestion(question)) { return; } Game game = new Game(question, "Arte e Literatura"); game.Show(); this.Visible = this.Enabled = false; }
// Todas private void bttnCategoryAll_Click(object sender, EventArgs e) { Question question = QuestionService.GetRandomQuestion(); if (!VerifyQuestion(question)) { return; } this.Hide(); Game game = new Game(question); game.Closed += (s, args) => this.Close(); game.Show(); }