예제 #1
0
        private void menuItem8_Click(object sender, EventArgs e)
        {
            ActivisationForm AF = new ActivisationForm(this.setting);

            AF.ShowDialog();

            //проверка проведена ли регистрация
            if (this.setting.IfRegistrated())
            {
                this.menuItem8.Visible          = false;
                this.groupBoxOption.Enabled     = true;
                this.buttonMatrixOfMark.Enabled = true;
                this.buttonExport.Enabled       = true;
                this.buttonImport.Enabled       = true;
                this.menuItemExport.Enabled     = this.menuItemImport.Enabled = true;
            }
            //проверка блокировки
            if (this.setting.IfStop())
            {
                MessageBox.Show("Програму заблоковано! Для розблокування її необхідно зареєструвати!");
                this.buttonForAdmin.Enabled = this.buttonForTeacher.Enabled = this.buttonForUser.Enabled = false;
                this.menuItem1.Enabled      = false;
            }
            else
            {
                this.buttonForAdmin.Enabled = this.buttonForTeacher.Enabled = this.buttonForUser.Enabled = this.menuItem1.Enabled = true;
            }
        }
예제 #2
0
        private void menuItem8_Click(object sender, EventArgs e)
        {
            ActivisationForm AF = new ActivisationForm(this.MF.setting);

            AF.ShowDialog();

            //проверка проведена ли регистрация
            if (this.MF.setting.IfRegistrated())
            {
                this.menuItem8.Visible = false;
            }
        }