private void DisplayWindow() { if (_window == null || !_window.Visible) { _window = _container.GetInstance <ConfigurationPanel>(); } _window.Show(); _window.Closed += (sender, args) => _window = null; }
/** * CONFIGURAITON PANEL ---- START * */ private async void ConfigControl_Click(object sender, EventArgs e) { loadingIcon.Visible = true; ResetFormLayout(); ConfigurationPanel.Show(); //--- ConfigControl.BackColor = Color.DarkRed; ConfigControl.ForeColor = Color.WhiteSmoke; lbPantallaPrincipal.Text = "Configuraciones Globales"; label1.Text = "Configuraciones"; await Task.Run(() => { //-- List <Configurations> configs = _context.Configurations.ToList(); GetConfigInfo(configs); //--- if (!ActivateSurvey.Checked) { SurveyLink.Enabled = false; OpenStudentSurveyFullscreen.Enabled = false; } else { SurveyLink.Enabled = true; OpenStudentSurveyFullscreen.Enabled = true; } if (!ActivateSurveyTeacher.Checked) { SurveyLinkTeacher.Enabled = false; OpenTeacherSurveyFullscreen.Enabled = false; } else { SurveyLinkTeacher.Enabled = true; OpenTeacherSurveyFullscreen.Enabled = true; } }); loadingIcon.Visible = false; }