Example #1
0
 public TeacherSettingsFrom(TeacherForm teacherForm, object user)
 {
     this.user        = (User)user;
     this.teacherForm = teacherForm;
     InitializeComponent();
     InitTextBox();
 }
Example #2
0
        public AddEditDataForm(TeacherForm teacherForm, string method, Result result, string labName)
        {
            InitializeComponent();
            this.method         = method;
            this.teacherForm    = teacherForm;
            this.result         = result;
            panel1.Visible      = false;
            panel3.Visible      = true;
            GBAnswer.Visible    = false;
            GBAnswerLab.Visible = true;
            LCount.Text         = "Количество заданий:";
            GBList.Text         = "Список заданий";
            GBData.Text         = "Текст задания";
            BSave.Text          = "Сохранить";
            Text          = "Проверка лабораторной работы";
            NUDMark.Value = (int)result.Mark;

            lab            = (Lab)Util.Deserialization(result.AnswerData);
            NUpDown.Value  = lab.TaskList.Count;
            TBNameLab.Text = labName;
            switch (result.Status)
            {
            case "Проверено":
                CBStatus.SelectedIndex = 1;
                break;

            case "Не проверено":
                CBStatus.SelectedIndex = 0;
                break;
            }
        }
Example #3
0
 public AddDataInGroupForm(TeacherForm teacherForm, object user, int groupId)
 {
     this.user        = (User)user;
     this.groupId     = groupId;
     this.teacherForm = teacherForm;
     InitializeComponent();
     InitDGVMyData();
 }
Example #4
0
        public AddEditDataForm(TeacherForm form, DataType dataType, string method, DataInGroup dataInGroup)
        {
            InitializeComponent();
            teacherForm   = form;
            this.method   = method;
            this.dataType = dataType;
            switch (dataType)
            {
            case DataType.Lab:
                panel1.Visible   = true;
                panel3.Visible   = false;
                GBAnswer.Visible = false;
                LCount.Text      = "Количество заданий:";
                GBList.Text      = "Список заданий";
                GBData.Text      = "Текст задания";
                BSave.Text       = "Сохранить лабораторную";
                BSaveOneObj.Text = "Сохранить задание";
                break;

            case DataType.Test:
                panel1.Visible       = true;
                panel3.Visible       = false;
                GBAnswer.Visible     = true;
                BAttachFiles.Visible = false;
                LCount.Text          = "Количество вопросов:";
                GBList.Text          = "Список вопросов";
                GBData.Text          = "Текст вопроса";
                BSave.Text           = "Сохранить тест";
                BSaveOneObj.Text     = "Сохранить вопрос";
                break;
            }
            switch (method)
            {
            case "Add":

                this.dataInGroup = new DataInGroup();
                if (DataType.Lab == dataType)
                {
                    Text = "Добавление лабораторной работы";
                    lab  = new Lab();
                }
                else
                {
                    Text = "Добавление теста";
                    test = new Test();
                }
                break;

            case "Edit":
                this.dataInGroup   = dataInGroup;
                TBNameProject.Text = dataInGroup.Text;
                if (dataInGroup.DataType.Equals(DataType.Lab.ToString()))
                {
                    Text          = "Редактирование лабораторной работы";
                    this.dataType = DataType.Lab;
                    lab           = (Lab)Util.Deserialization(dataInGroup.Data);
                    NUpDown.Value = lab.TaskList.Count;
                }
                else
                {
                    Text          = "Редактирование теста";
                    this.dataType = DataType.Test;
                    test          = (Test)Util.Deserialization(dataInGroup.Data);
                    NUpDown.Value = test.QuestionsList.Count;
                }
                break;
            }
        }
Example #5
0
 public BeforeForm(TeacherForm teacherForm)
 {
     InitializeComponent();
     this.teacherForm = teacherForm;
     RBLab.Checked    = true;
 }