private void AcceptNormas_Load(object sender, EventArgs e) { var normas = _context.Normas.Select(n => n); Myconfiguration AllowSelectTeacherSubjectCF = _context.Configurations.Where(c => c.Key.ToUpper().Equals("ALLOW_SELECT_TEACHER_SUBJECT")).FirstOrDefault(); bool showSwitch = false; // allow select teacher subject if (AllowSelectTeacherSubjectCF.Value.ToUpper().Equals("TRUE")) { showSwitch = true; } int counter = 1; foreach (Norma norma in normas) { Terms.AppendText(counter.ToString() + ") " + norma.NormaContent + "\n\n"); counter++; } optionalSubjects.Enabled = false; optionalTeachers.Enabled = false; optionalSection.Enabled = false; if (!showSwitch) { SwitchButton.Hide(); } Terms.ScrollToCaret(); Terms.AutoWordSelection = false; Terms.HideSelection = true; Terms.Capture = false; LoadingAppIcon.Hide(); }
private void button1_Click(object sender, EventArgs e) { LoadingAppIcon.Show(); button1.Enabled = false; if (Disclaimer.Checked) { if (Dologic()) { MessageBox.Show("¡Gracias por su tiempo y colaboración!"); } else { MessageBox.Show("Lo sentimos, inténtelo de nuevo la próxima vez que inicie sesión."); MessageBox.Show(error); } Application.Exit(); } else { MessageBox.Show(ConfirmationBoxUnChecked, "LABTI - INTEC"); button1.Enabled = true; } LoadingAppIcon.Hide(); }