Exemplo n.º 1
0
 private void MenuButton_Click(object sender, EventArgs e)
 {
     TimeLabel.Hide();
     NextButton.Hide();
     AddQuestionButton.Show();
     StartButton.Show();
     ResetButton.Hide();
     IDLabel.Show();
     IDTextField.Show();
     DeleteAnswersButton.Hide();
     Timp.Stop();
 }
Exemplo n.º 2
0
 public AddPaymentForm(int id, string n, decimal m)
 {
     InitializeComponent();
     id_user              = id;
     name                 = n;
     old_money            = m;
     UserLogin.Text      += name;
     DateCheckBox.Checked = true;
     HourBox.Hide();
     MinuteBox.Hide();
     TimeLabel.Hide();
     IDLabel.Hide();
     IDComboBox.Hide();
     hLabel.Hide();
     mLabel.Hide();
 }
Exemplo n.º 3
0
        private void NextButton_Click(object sender, EventArgs e)
        {
            List <string> variante = new List <string>();

            if (VariantaACheckBox.Checked)
            {
                variante.Add("a");
            }

            if (VariantaBCheckBox.Checked)
            {
                variante.Add("b");
            }

            if (VariantaCCheckBox.Checked)
            {
                variante.Add("c");
            }

            if (VariantaDCheckBox.Checked)
            {
                variante.Add("d");
            }

            if (variante.Count() == 0)
            {
                while (Visited[(QuestionNumber + 1) % 26])
                {
                    QuestionNumber++;

                    if (QuestionNumber == 26)
                    {
                        QuestionNumber = 0;
                    }
                }

                QuestionNumber++;
                DisplayQuestion(QuestionNumber);
                return;
            }

            Visited[QuestionNumber] = true;

            if (quizController.CheckAnswer(QuestionNumber, variante) == false)
            {
                quizController.Quiz.Gresite++;
                UpdateGresite();
            }
            else
            {
                quizController.Quiz.Corecte++;
                UpdateCorecte();
            }

            if (CheckIfLost())
            {
                IntrebareTextBox.Text = "AI PICAT!";
                NextButton.Hide();
                DeleteAnswersButton.Hide();
                AddQuestionButton.Show();
                IDLabel.Show();
                IDTextField.Show();
                ResetCheckBoxes();
                TimeLabel.Hide();
                return;
            }

            if (quizController.Quiz.Corecte + quizController.Quiz.Gresite == 26)
            {
                if (CheckIfPassed())
                {
                    IntrebareTextBox.Text = "AI TRECUT!";
                    NextButton.Hide();
                    DeleteAnswersButton.Hide();
                    AddQuestionButton.Show();
                    IDLabel.Show();
                    IDTextField.Show();
                    ResetCheckBoxes();
                    TimeLabel.Hide();
                    return;
                }

                if (CheckIfLost())
                {
                    IntrebareTextBox.Text = "AI PICAT!";
                    NextButton.Hide();
                    DeleteAnswersButton.Hide();
                    AddQuestionButton.Show();
                    IDLabel.Show();
                    IDTextField.Show();
                    ResetCheckBoxes();
                    TimeLabel.Hide();
                    return;
                }
            }

            ResetCheckBoxes();

            while (Visited[QuestionNumber])
            {
                QuestionNumber++;

                if (QuestionNumber == 26)
                {
                    QuestionNumber = 0;
                }
            }

            DisplayQuestion(QuestionNumber);
        }