コード例 #1
0
        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();
        }