示例#1
0
 private void buttonNextTask_Click(object sender, EventArgs e)
 {
     if (taskIndex == 10)
     {
         bool good = true;
         if (errorsCount > 2)
         {
             good = false;
         }
         FormAnswer fa = new FormAnswer(good);
         fa.StartPosition = FormStartPosition.CenterScreen;
         fa.ShowDialog();
         tasksForm.Show();
         Close();
         return;
     }
     taskIndex++;
     labelCounterIndex.Text = taskIndex.ToString() + " / 10";
     if (taskIndex == 10)
     {
         buttonNextTask.Text = "Закончить упражнение";
     }
     pictureBoxAnswer.Visible = false;
     buttonNextTask.Visible   = false;
     rerenderBlock();
 }
示例#2
0
 private void rerenderBlock()
 {
     if (taskIndex == 1)
     {
         pictureBox2.Image = Properties.Resources.b3t1;
     }
     if (taskIndex == 2)
     {
         pictureBox2.Image = Properties.Resources.b3t2;
     }
     if (taskIndex == 3)
     {
         pictureBox2.Image = Properties.Resources.b3t3;
     }
     if (taskIndex == 4)
     {
         pictureBox2.Image = Properties.Resources.b3t4;
     }
     if (taskIndex == 5)
     {
         pictureBox2.Image = Properties.Resources.b3t5;
     }
     if (taskIndex == 6)
     {
         pictureBox2.Image = Properties.Resources.b3t6;
     }
     if (taskIndex == 7)
     {
         pictureBox2.Image = Properties.Resources.b3t7;
     }
     pictureBox2.Refresh();
     labelCounterIndex.Text = taskIndex.ToString() + " / 7";
     if (taskIndex == 8)
     {
         labelCounterIndex.Text = "7 / 7";
         bool good = true;
         if (errorCounter > 1)
         {
             good = false;
         }
         FormAnswer fa = new FormAnswer(good);
         fa.StartPosition = FormStartPosition.CenterScreen;
         fa.ShowDialog();
         tasksForm.Show();
         Close();
         return;
     }
 }