Beispiel #1
0
 private void SaveProperties(object sender, EventArgs e)
 {
     Shared.Properties properties = new Shared.Properties()
     {
         Code         = txt_code.Text,
         Instructions = txt_instruction.Text,
         Passmark     = (int)num_passmark.Value,
         TimeLimit    = (int)num_time_limit.Value,
         Title        = txt_title.Text,
         Version      = (int)float.Parse(lbl_version.Text)
     };
     //
     if (trv_view_exam.Nodes.Count > 0)
     {
         ExamNode examNode = (ExamNode)trv_view_exam.Nodes[0];
         examNode.Properties = properties;
     }
     else
     {
         ExamNode examNode = new ExamNode(properties);
         trv_view_exam.Nodes.Add(examNode);
     }
     //
     trv_view_exam.ExpandAll();
     //
     EnableExamControls();
     EnableSectionControls();
     //
     IsDirty = true;
 }
Beispiel #2
0
        private void SaveProperties(object sender, EventArgs e)
        {
            Shared.Properties properties = new Shared.Properties();
            properties.Code         = txt_code.Text;
            properties.Instructions = txt_instruction.Text;
            properties.Passmark     = (int)num_passmark.Value;
            properties.TimeLimit    = (int)num_time_limit.Value;
            properties.Title        = txt_title.Text;
            properties.Version      = int.Parse(lbl_version.Text);
            //
            ExamNode examNode = new ExamNode(properties);

            trv_view_exam.Nodes.Add(examNode);
            //
            trv_view_exam.ExpandAll();
            //
            EnableExamControls();
            EnableSectionControls();
            //
            IsDirty = true;
        }