void InitializeGroups() { //Send mail ControlsEnabler ctrlEnabler = new ControlsEnabler(); ctrlEnabler.AddControl(tbSendEmail); cbSendActive.CheckedChanged += ctrlEnabler.CheckedChanged; //Save to log ctrlEnabler = new ControlsEnabler(); ctrlEnabler.AddControl(tbLog); ctrlEnabler.AddControl(bSearch); cbSaveActive.CheckedChanged += ctrlEnabler.CheckedChanged; // cbSendActive.Checked = cbSaveActive.Checked = false; }
public MainForm() { // Pre- MainForm.InitializeComponent(); // Instantiate sources of input validation, and inputProvidedEArgs creation // functions used by InputValidating derived text boxes. this._validationFunctionsSource = new ValidationFunctionsSource(this); this._inputProvidedEArgsFunctionsSource = new InputProvidedEArgsFunctionsSource(this); // Instantiate general helpers classes this._consolesServices = new ConsolesServices(this); this._dataDisplayServices = new DataDisplayServices(this); this._controlsEnabler = new ControlsEnabler(this); // Instantiate tab specific helpers classes this._preBriefTabServices = new PreBriefTabServices(this); this._deBriefTabServices = new DeBriefTabServices(this); this._optionsTabServices = new OptionsTabServices(this); this._saturn5StockManagementTabServices = new Saturn5StockManagementTabServices(this); this._adminTabServices = new AdminTabServices(this); // Instantiate UITasks this._allocateSaturn5BySerialNumberUITask = new AllocateSaturn5BySerialNumberUITask(this); this._allocateSaturn5ByShortIdUITask = new AllocateSaturn5ByShortIdUITask(this); this._emergencyAllocateSaturn5BySerialNumberUITask = new EmergencyAllocateSaturn5BySerialNumberUITask(this); this._confirmBackInSaturn5BySerialNumber = new ConfirmBackInSaturn5BySerialNumberUITask(this); this._confirmBackInSaturn5ByShortId = new ConfirmBackInSaturn5ByShortIdUITask(this); this._confirmBackInFaultySaturn5BySerialNumber = new ConfirmBackInFaultySaturn5BySerialNumberUITask(this); this._confirmBackInDamageSaturn5BySerialNumber = new ConfirmBackInDamageSaturn5BySerialNumberUITask(this); this._connectUITask = new ConnectUITask(this); this._disconnectUITask = new DisconnectUITask(this); this._logInUITask = new LogInUITask(this); this._logOutUITask = new LogOutUITask(this); this._saturn5ReceiveFromITUITask = new Saturn5ReceiveFromITUITask(this); this._createSaturn5UITask = new CreateSaturn5UITask(this); this._editSaturn5UITask = new EditSaturn5UITask(this); this._saturn5SendToITUITask = new Saturn5SendToITUITask(this); this._removeSaturn5UITask = new RemoveSaturn5UITask(this); this._reportSaturn5FaultUITask = new ReportSaturn5FaultUITask(this); this._reportSaturn5DamageUITask = new ReportSaturn5DamageUITask(this); this._resolveSaturn5IssueUITask = new ResolveSaturn5IssueUITask(this); this._createUserUITask = new CreateUserUITask(this); this._editUserUITask = new EditUserUITask(this); this._removeUserUITask = new RemoveUserUITask(this); // Initialize Designer generated components. this.InitializeComponent(); // Past- MainForm.InitializeComponent(); // Assign input validation, and inputProvidedEArgs creation // functions used by InputValidating derived text boxes. this.AssignInputValidatingTextBoxesFunctions(); // On application started. Print appropriate informations to the user... this._consolesServices.OnApplicationStarted(this, System.EventArgs.Empty); // .. as well as assure that appropriate controls are enabled. this._controlsEnabler.OnApplicationStarted(this, System.EventArgs.Empty); // Assures that options tab is selected on application start. this.tcMain.SelectedTab = tpOptions; }