Пример #1
0
 /// <summary>
 /// This form will show the results after a test is made.
 /// </summary>
 /// <param name="fs">The Form_Select form</param>
 /// <param name="Good">How many good answers</param>
 /// <param name="Bad">How many wrong answers</param>
 /// <param name="fsums">The Form_Sums form</param>
 public Form_Results(Form_Select fs, int Good, int Bad, Form_Sums fsums= null)
 {
     InitializeComponent();
     FormSelect = fs;
     FormSums = fsums;
     lblGood.Text = Good.ToString();
     lblBad.Text = Bad.ToString();
     lblName.Text = fs.StudentName;
     sql.sendCommand("INSERT INTO results (Name, TypeSum, Score, OutOf) VALUES ('" + fs.StudentName+"', '"+fsums.Type+"', '"+Good+"', '"+fsums.SumsCount+"')");
 }
Пример #2
0
 /// <summary>
 /// Handle form closing and open Form_Select form.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Form_Results_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (Back)
     {
         Form_Sums fsums = new Form_Sums(FormSelect, FormSums.Type);
         fsums.Show();
     }
     else
     {
         FormSelect.Visible = true;
     }
 }
Пример #3
0
 /// <summary>
 /// Start test with times sums.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnTimes_Click(object sender, EventArgs e)
 {
     Form_Sums FormSums = new Form_Sums(this, "times");
     FormSums.Show();
     this.Visible = false;
 }
 /// <summary>
 /// Start new test with sum type that is advised.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAdvise_Click(object sender, EventArgs e)
 {
     Form_Sums fsums = new Form_Sums(FormSelect, adviseSums);
     this.Close();
     fsums.Show();
 }
Пример #5
0
 /// <summary>
 /// Start test with devide sums.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDivide_Click(object sender, EventArgs e)
 {
     Form_Sums FormSums = new Form_Sums(this, "devide");
     FormSums.Show();
     this.Visible = false;
 }