Exemplo n.º 1
0
 /// <summary>
 /// This form will just show the user a welcome message, this is mainly for showing the name the user has selected.
 /// </summary>
 /// <param name="fn">The Form_Name form</param>
 /// <param name="name">The name of the user</param>
 public Form_Welcome(Form_name fn, String name)
 {
     InitializeComponent();
     FormSelect = new Form_Select(fn, name);
     label1.Text = "Welkom " + name;
     this.Size = label1.Size;
 }
Exemplo n.º 2
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+"')");
 }
 /// <summary>
 /// This form will show all test results and give advise on what sums you need to learn beter.
 /// </summary>
 /// <param name="fs">The Form_Select form</param>
 public Form_ResultsAdvise(Form_Select fs)
 {
     InitializeComponent();
     FormSelect = fs;
     student = fs.StudentName;
     loadResults("plus");
     loadResults("minus");
     loadResults("times");
     loadResults("devide");
     calcAdvise();
 }
Exemplo n.º 4
0
        /// <summary>
        /// This form will be used to show the sums test.
        /// </summary>
        /// <param name="fs"></param>
        /// <param name="SumType"></param>
        public Form_Sums(Form_Select fs, String SumType)
        {
            InitializeComponent();
            FormSelect = fs;
            FormSelect.FormName.Started = true;
            Type = SumType;
            Answer = GenSum();
            txtAnswer.Focus();
            AcceptButton = btnNext;
            SumsCount = int.Parse(ConfigurationSettings.AppSettings.Get("sumcount"));
            min = int.Parse(ConfigurationSettings.AppSettings.Get("summinnumber"));
            max = int.Parse(ConfigurationSettings.AppSettings.Get("summaxnumber"));

            if (ConfigurationSettings.AppSettings.Get("admin").ToString() == "false")
            {
                lblSneak.Visible = false;
            }
        }