Ejemplo n.º 1
0
        public PanelDeleteMark()
        {
            InitializeComponent();
            CausesValidation = false;
            AutoValidate     = AutoValidate.EnableAllowFocusChange;

            validatorList2 = new ValidatorListBox(listbox_student, errorProvider);

            this.listbox_student.Validating += new System.ComponentModel.CancelEventHandler(this.validatorList2.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);
        }