コード例 #1
0
ファイル: Form1.cs プロジェクト: cristi-iacob/uvvss
 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();
 }
コード例 #2
0
ファイル: AddPaymentForm.cs プロジェクト: PatrykM5/MySQLApp
 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();
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: cristi-iacob/uvvss
        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);
        }