Ejemplo n.º 1
0
        /// <summary>
        /// Must check IsExitAllowed PRIOR to calling this routine.
        /// </summary>
        /// <param name="sFormKey"></param>
        private void DisplayNewForm(frbHSDChild newForm)
        {
            if (newForm == _currForm)
            {
                return;
            }

            _currForm.ExitRoutines();
            newForm.ShowAndRunEntryRoutines();
            _currForm.Hide();                   //having this *after* newForm.Show() reduces ugly flicker.  still don't look great.  :(
            _currForm = newForm;
        }
Ejemplo n.º 2
0
        private void InitChildFormsAndDictionaries()
        {
            _fDayBookEntry   = new frcDayBookEntry();
            _fAttendance     = new frcAttendance();
            _fManageSubjects = new frcManageSubjects();
            _fManageKids     = new frcManageKids();
            _fManageEntries  = new frcManageEntries();
            _fSystemSettings = new frcSystemSettings();
            _fReporting      = new frcChooseReports();

            _hashRadToChildForm = new Dictionary <KryptonCheckButton, frbHSDChild>();
            _hashRadToChildForm[this.radDayBookEntries] = _fDayBookEntry;
            _hashRadToChildForm[this.radAttendance]     = _fAttendance;
            _hashRadToChildForm[this.radManageSubjects] = _fManageSubjects;
            _hashRadToChildForm[this.radManageKids]     = _fManageKids;
            _hashRadToChildForm[this.radManageEntries]  = _fManageEntries;
            _hashRadToChildForm[this.radSystemSettings] = _fSystemSettings;
            _hashRadToChildForm[this.radReporting]      = _fReporting;

            _hashFnKeyToRad          = new Dictionary <Keys, KryptonCheckButton>();
            _hashFnKeyToRad[Keys.F1] = this.radDayBookEntries;
            _hashFnKeyToRad[Keys.F2] = this.radAttendance;
            _hashFnKeyToRad[Keys.F3] = this.radManageSubjects;
            _hashFnKeyToRad[Keys.F4] = this.radManageKids;
            _hashFnKeyToRad[Keys.F5] = this.radManageEntries;
            _hashFnKeyToRad[Keys.F6] = this.radSystemSettings;
            _hashFnKeyToRad[Keys.F7] = this.radReporting;

            foreach (Form f in _hashRadToChildForm.Values)
            {
                CreateAllHandles(f);
                f.FormBorderStyle = FormBorderStyle.None;
                f.TopLevel        = false;
                f.Visible         = false;
                f.Dock            = DockStyle.Fill;
                ((frbHSDAppearance)f).DisplayHSDKryptonized(f.Controls);
                pnlMain.Controls.Add(f);
            }

            _currForm = _fDayBookEntry;
        }