public PanelAddLearningProgram()
        {
            InitializeComponent();
            CausesValidation = false;
            AutoValidate     = AutoValidate.EnableAllowFocusChange;
            validator1       = new ValidatorText(textbox_lesson_name, errorProvider);
            validator2       = new ValidatorNumber(textbox_year_of_creation, errorProvider);
            validator3       = new ValidatorCheckedListBox(checkedlistbox_subjects, errorProvider);

            this.textbox_lesson_name.Validating      += new System.ComponentModel.CancelEventHandler(this.validator1.Validating);
            this.textbox_year_of_creation.Validating += new System.ComponentModel.CancelEventHandler(this.validator2.Validating);
            this.checkedlistbox_subjects.Validating  += new System.ComponentModel.CancelEventHandler(this.validator3.Validating);
        }
        public PanelAddStudentGroup()
        {
            InitializeComponent();
            CausesValidation = false;
            AutoValidate     = AutoValidate.EnableAllowFocusChange;
            validator1       = new ValidatorText(textbox_group_name, errorProvider);
            validator2       = new ValidatorNumber(textbox_year_of_creation, errorProvider);

            validatorList1 = new ValidatorListBox(listbox_classroom, errorProvider);
            validatorList2 = new ValidatorListBox(listbox_classroom_teacher, errorProvider);
            validatorList3 = new ValidatorListBox(listbox_learning_program, errorProvider);

            validatorCheck = new ValidatorCheckedListBox(checkedLilistbox_students, errorProvider);

            this.textbox_group_name.Validating       += new System.ComponentModel.CancelEventHandler(this.validator1.Validating);
            this.textbox_year_of_creation.Validating += new System.ComponentModel.CancelEventHandler(this.validator2.Validating);

            this.listbox_classroom.Validating         += new System.ComponentModel.CancelEventHandler(this.validatorList1.Validating);
            this.listbox_classroom_teacher.Validating += new System.ComponentModel.CancelEventHandler(this.validatorList2.Validating);
            this.listbox_learning_program.Validating  += new System.ComponentModel.CancelEventHandler(this.validatorList3.Validating);

            this.checkedLilistbox_students.Validating += new System.ComponentModel.CancelEventHandler(this.validatorCheck.Validating);
        }