Exemplo n.º 1
0
        private void StartGameButton_Click(object sender, EventArgs e)
        {
            //if (string.IsNullOrWhiteSpace(playerNameBox.Text))
            //    return;

            var selectedButton = choosePackGroupBox.Controls.OfType <RadioButton>().Where(x => x.Checked).FirstOrDefault();

            questionController.LoadQuestionPack(selectedButton.Text);
            initialPanel.Visible = false;
            gamePanel.Visible    = true;
            questionController.SetQuestionController(-1, QuestionType.Default);
            NewQuestion();
        }
Exemplo n.º 2
0
 private void EditButton_Click(object sender, EventArgs e)
 {
     if (PackList.SelectedItem != null)
     {
         questionController.LoadQuestionPack(PackList.SelectedItem.ToString());
         InputPackNameTextBox.Text = questionController.GetPackName();
         InitialGroupBox.Visible   = false;
         PackNameGroupBox.Visible  = true;
         DeleteButton_Click(sender, e);
     }
     else
     {
         MessageBox.Show("Выберите набор для редактирования");
     }
 }