예제 #1
0
        /// <summary>
        /// Конструктор объекта формы администратора
        /// </summary>
        /// <param name="control">Объект управления действиями</param>
        public AdminForm(ControlActions control, ApplicationContextUT context)
        {
            InitializeComponent();
            Context = context;
            Context.AddForm();
            Control                          = new ControlActionsAdmin(control, this);
            ListQuestions                    = null;
            EventButtonsUsers                = false;
            EventButtonsQuestions            = false;
            cmbLevelDifficulty.SelectedIndex = 0;
            cmbSubject.SelectedIndex         = 0;


            this.FormClosed += (sender, e) => Context.RemoveForm();

            btnAddQuestion.Click               += AddQuestion;
            rbAddQuestion.CheckedChanged       += RbAddQuestion_CheckedChanged;
            rbEditQuestion.CheckedChanged      += RbEditQuestion_CheckedChanged;
            rbQuestionByNumber.CheckedChanged  += RbQuestionByNumber_CheckedChanged;
            rbQuestionsByFilter.CheckedChanged += RbQuestionsByFilter_CheckedChanged;
            btnOutputQuestions.Click           += (sender, e) => OutputQuestions();
            nudListNumberQuestion.ValueChanged += (sender, e) => OutputListQuestion();
            btnEditQuestion.Click              += EditQuestion;

            rbLogin.CheckedChanged += (sender, e) => ChangeEnabledTBLogin();
            btnOutputUsers.Click   += (sender, e) => OutputUsers();
            btnChangeRole.Click    += ChangeRole;
            btnChangeActing.Click  += ChangeActing;

            btnUserMode.Click += SwitchingUserMode;
        }
예제 #2
0
 /// <summary>
 /// Конструктор объекта управления действиями пользователя
 /// </summary>
 /// <param name="control">Объекта управления действиями</param>
 /// <param name="form">Объект формы пользователя</param>
 public ControlActionsUser(ControlActions control, UserForm form)
     : base(control)
 {
     Form        = form;
     EasyCount   = 10;
     MediumCount = 10;
     HardCount   = 10;
 }
예제 #3
0
        /// <summary>
        /// Конструктор объекта формы пользователя
        /// </summary>
        public UserForm(ControlActions control, ApplicationContextUT context)
        {
            InitializeComponent();
            Context = context;
            Context.AddForm();
            Control                  = new ControlActionsUser(control, this);
            EventButtons             = false;
            cmbSubject.SelectedIndex = 0;

            this.FormClosed += (sender, e) => Context.RemoveForm();

            btnOutputTest.Click   += OutputTest;
            btnTestComplete.Click += TestComplete;
            btnAdminMode.Click    += SwitchingAdminMode;
            nudListNumberQuestion.ValueChanged += (sender, e) => OutputListAnswer();
            rbtAnswer1.CheckedChanged          += CheckedChangedAnswer;
            rbtAnswer2.CheckedChanged          += CheckedChangedAnswer;
            rbtAnswer3.CheckedChanged          += CheckedChangedAnswer;
            rbtAnswer4.CheckedChanged          += CheckedChangedAnswer;
        }
예제 #4
0
 /// <summary>
 /// Конструктор объекта управления действиями администратора
 /// </summary>
 /// <param name="control">Объекта управления действиями</param>
 /// <param name="form">Объект формы администратора</param>
 public ControlActionsAdmin(ControlActions control, AdminForm form)
     : base(control)
 {
     Form = form;
 }
예제 #5
0
 /// <summary>
 /// Конструктор объекта управления действиями
 /// </summary>
 /// <param name="control">Объект управления действиями</param>
 public ControlActions(ControlActions control)
 {
     Authentication = control.Authentication;
     Client         = control.Client;
     InitializationComponent();
 }