コード例 #1
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (textRight.errorProvider1.GetError(textRight) != "" ||
                textDown.errorProvider1.GetError(textDown) != "" ||
                textDaysPast.errorProvider1.GetError(textDaysPast) != "" ||
                textDaysFuture.errorProvider1.GetError(textDaysFuture) != "")
            {
                MsgBox.Show(this, "Please fix data entry errors first.");
                return;
            }
            if (textPostcardsPerSheet.Text != "1" &&
                textPostcardsPerSheet.Text != "3" &&
                textPostcardsPerSheet.Text != "4")
            {
                MsgBox.Show(this, "The value in postcards per sheet must be 1, 3, or 4");
                return;
            }

            Prefs.UpdateString("RecallPattern", textPattern.Text);

            Prefs.UpdateString("RecallProcedures", textProcs.Text);

            Prefs.UpdateString("RecallBW", textBW.Text);

            Prefs.UpdateString("RecallPostcardMessage", textPostcardMessage.Text);

            Prefs.UpdateString("RecallPostcardFamMsg", textPostcardFamMsg.Text);

            Prefs.UpdateString("ConfirmPostcardMessage", textConfirmPostcardMessage.Text);

            Prefs.UpdateString("RecallPostcardsPerSheet", textPostcardsPerSheet.Text);

            Prefs.UpdateBool("RecallCardsShowReturnAdd", checkReturnAdd.Checked);

            Prefs.UpdateBool("RecallGroupByFamily", checkGroupFamilies.Checked);

            Prefs.UpdateInt("RecallDaysPast", PIn.PInt(textDaysPast.Text));
            Prefs.UpdateInt("RecallDaysFuture", PIn.PInt(textDaysFuture.Text));

            Prefs.UpdateDouble("RecallAdjustRight", PIn.PDouble(textRight.Text));
            Prefs.UpdateDouble("RecallAdjustDown", PIn.PDouble(textDown.Text));

            DataValid.SetInvalid(InvalidTypes.Prefs);
            DialogResult = DialogResult.OK;
        }
コード例 #2
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (textRight.errorProvider1.GetError(textRight) != "" ||
                textDown.errorProvider1.GetError(textDown) != "")
            {
                MsgBox.Show(this, "Please fix data entry errors first.");
                return;
            }
            bool changed = false;

            if (Prefs.UpdateBool("RxOrientVert", radioVertical.Checked)
                | Prefs.UpdateDouble("RxAdjustRight", PIn.PDouble(textRight.Text))
                | Prefs.UpdateDouble("RxAdjustDown", PIn.PDouble(textDown.Text)))
            {
                changed = true;
            }
            if (radioGeneric.Checked)
            {
                if (Prefs.UpdateInt("RxGeneric", 0))
                {
                    changed = true;
                }
            }
            else if (radioNeither.Checked)
            {
                if (Prefs.UpdateInt("RxGeneric", 1))
                {
                    changed = true;
                }
            }
            else if (radioTwoSig.Checked)
            {
                if (Prefs.UpdateInt("RxGeneric", 2))
                {
                    changed = true;
                }
            }
            if (changed)
            {
                DataValid.SetInvalid(InvalidTypes.Prefs);
            }
            DialogResult = DialogResult.OK;
        }
コード例 #3
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (textRight.errorProvider1.GetError(textRight) != "" ||
                textDown.errorProvider1.GetError(textDown) != "" ||
                textDaysPast.errorProvider1.GetError(textDaysPast) != "" ||
                textDaysFuture.errorProvider1.GetError(textDaysFuture) != "" ||
                textDaysFirstReminder.errorProvider1.GetError(textDaysFirstReminder) != "" ||
                textDaysSecondReminder.errorProvider1.GetError(textDaysSecondReminder) != "" ||
                textMaxReminders.errorProvider1.GetError(textMaxReminders) != "")
            {
                MsgBox.Show(this, "Please fix data entry errors first.");
                return;
            }
            if (textPostcardsPerSheet.Text != "1" &&
                textPostcardsPerSheet.Text != "3" &&
                textPostcardsPerSheet.Text != "4")
            {
                MsgBox.Show(this, "The value in postcards per sheet must be 1, 3, or 4");
                return;
            }
            if (comboStatusMailedRecall.SelectedIndex == -1 || comboStatusMailedRecall.SelectedIndex == -1)
            {
                MsgBox.Show(this, "Both status options at the bottom must be set.");
                return;
            }
            if (Prefs.UpdateString(PrefName.RecallPostcardsPerSheet, textPostcardsPerSheet.Text))
            {
                if (textPostcardsPerSheet.Text == "1")
                {
                    MsgBox.Show(this, "If using 1 postcard per sheet, you must adjust the position, and also the preview will not work");
                }
            }
            Prefs.UpdateBool(PrefName.RecallCardsShowReturnAdd, checkReturnAdd.Checked);
            Prefs.UpdateBool(PrefName.RecallGroupByFamily, checkGroupFamilies.Checked);
            if (textDaysPast.Text == "")
            {
                Prefs.UpdateLong(PrefName.RecallDaysPast, -1);
            }
            else
            {
                Prefs.UpdateLong(PrefName.RecallDaysPast, PIn.Long(textDaysPast.Text));
            }
            if (textDaysFuture.Text == "")
            {
                Prefs.UpdateLong(PrefName.RecallDaysFuture, -1);
            }
            else
            {
                Prefs.UpdateLong(PrefName.RecallDaysFuture, PIn.Long(textDaysFuture.Text));
            }
            Prefs.UpdateDouble(PrefName.RecallAdjustRight, PIn.Double(textRight.Text));
            Prefs.UpdateDouble(PrefName.RecallAdjustDown, PIn.Double(textDown.Text));
            if (comboStatusEmailedRecall.SelectedIndex == -1)
            {
                Prefs.UpdateLong(PrefName.RecallStatusEmailed, 0);
            }
            else
            {
                Prefs.UpdateLong(PrefName.RecallStatusEmailed, DefC.Short[(int)DefCat.RecallUnschedStatus][comboStatusEmailedRecall.SelectedIndex].DefNum);
            }
            if (comboStatusMailedRecall.SelectedIndex == -1)
            {
                Prefs.UpdateLong(PrefName.RecallStatusMailed, 0);
            }
            else
            {
                Prefs.UpdateLong(PrefName.RecallStatusMailed, DefC.Short[(int)DefCat.RecallUnschedStatus][comboStatusMailedRecall.SelectedIndex].DefNum);
            }
            if (comboStatusEmailedConfirm.SelectedIndex == -1)
            {
                Prefs.UpdateLong(PrefName.ConfirmStatusEmailed, 0);
            }
            else
            {
                Prefs.UpdateLong(PrefName.ConfirmStatusEmailed, DefC.Short[(int)DefCat.ApptConfirmed][comboStatusEmailedConfirm.SelectedIndex].DefNum);
            }
            string recalltypes = "";

            for (int i = 0; i < listTypes.SelectedIndices.Count; i++)
            {
                if (i > 0)
                {
                    recalltypes += ",";
                }
                recalltypes += RecallTypeC.Listt[listTypes.SelectedIndices[i]].RecallTypeNum.ToString();
            }
            Prefs.UpdateString(PrefName.RecallTypesShowingInList, recalltypes);
            if (textDaysFirstReminder.Text == "")
            {
                Prefs.UpdateLong(PrefName.RecallShowIfDaysFirstReminder, -1);
            }
            else
            {
                Prefs.UpdateLong(PrefName.RecallShowIfDaysFirstReminder, PIn.Long(textDaysFirstReminder.Text));
            }
            if (textDaysSecondReminder.Text == "")
            {
                Prefs.UpdateLong(PrefName.RecallShowIfDaysSecondReminder, -1);
            }
            else
            {
                Prefs.UpdateLong(PrefName.RecallShowIfDaysSecondReminder, PIn.Long(textDaysSecondReminder.Text));
            }
            if (textMaxReminders.Text == "")
            {
                Prefs.UpdateLong(PrefName.RecallMaxNumberReminders, -1);
            }
            else
            {
                Prefs.UpdateLong(PrefName.RecallMaxNumberReminders, PIn.Long(textMaxReminders.Text));
            }
            if (radioUseEmailTrue.Checked)
            {
                Prefs.UpdateBool(PrefName.RecallUseEmailIfHasEmailAddress, true);
            }
            else
            {
                Prefs.UpdateBool(PrefName.RecallUseEmailIfHasEmailAddress, false);
            }
            changed      = true;
            DialogResult = DialogResult.OK;
        }
コード例 #4
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (textRight.errorProvider1.GetError(textRight) != "" ||
                textDown.errorProvider1.GetError(textDown) != "" ||
                textDaysPast.errorProvider1.GetError(textDaysPast) != "" ||
                textDaysFuture.errorProvider1.GetError(textDaysFuture) != "")
            {
                MsgBox.Show(this, "Please fix data entry errors first.");
                return;
            }
            if (textPostcardsPerSheet.Text != "1" &&
                textPostcardsPerSheet.Text != "3" &&
                textPostcardsPerSheet.Text != "4")
            {
                MsgBox.Show(this, "The value in postcards per sheet must be 1, 3, or 4");
                return;
            }
            if (textFMXPanoYrInterval.Text != "1" &&
                textFMXPanoYrInterval.Text != "2" &&
                textFMXPanoYrInterval.Text != "3" &&
                textFMXPanoYrInterval.Text != "4" &&
                textFMXPanoYrInterval.Text != "5" &&
                textFMXPanoYrInterval.Text != "6" &&
                textFMXPanoYrInterval.Text != "7" &&
                textFMXPanoYrInterval.Text != "")
            {
                textFMXPanoYrInterval.Text = "";
                MsgBox.Show(this, "The value for FMX/Pano interval must be a single number between 1 and 7 years, or you may leave it blank to disable this and only use BW's.");
                return;
            }


            Prefs.UpdateInt("RecallFMXPanoYrInterval", PIn.PInt(textFMXPanoYrInterval.Text));
            Prefs.UpdateString("RecallFMXPanoProc", textFMXPanoProc.Text);
            Prefs.UpdateBool("RecallDisableAutoFilms", checkDisableAutoFilms.Checked);

            Prefs.UpdateString("RecallPerioTriggerProcs", textPerioTriggerProcs.Text);

            Prefs.UpdateString("RecallProceduresPerio", textProcsPerio.Text);
            Prefs.UpdateString("RecallPatternPerio", textPatternPerio.Text);
            Prefs.UpdateBool("RecallDisablePerioAlt", checkDisablePerioAlt.Checked);

            Prefs.UpdateString("RecallProceduresChild", textProcsChild.Text);
            Prefs.UpdateString("RecallPatternChild", textPatternChild.Text);

            Prefs.UpdateString("RecallPattern", textPatternAdult.Text);

            Prefs.UpdateString("RecallProcedures", textProcsAdult.Text);

            Prefs.UpdateString("RecallBW", textBW.Text);

            Prefs.UpdateString("RecallPostcardMessage", textPostcardMessage.Text);

            Prefs.UpdateString("RecallPostcardFamMsg", textPostcardFamMsg.Text);

            Prefs.UpdateString("ConfirmPostcardMessage", textConfirmPostcardMessage.Text);

            Prefs.UpdateString("RecallPostcardsPerSheet", textPostcardsPerSheet.Text);

            Prefs.UpdateBool("RecallCardsShowReturnAdd", checkReturnAdd.Checked);

            Prefs.UpdateBool("RecallGroupByFamily", checkGroupFamilies.Checked);

            Prefs.UpdateInt("RecallDaysPast", PIn.PInt(textDaysPast.Text));
            Prefs.UpdateInt("RecallDaysFuture", PIn.PInt(textDaysFuture.Text));

            Prefs.UpdateDouble("RecallAdjustRight", PIn.PDouble(textRight.Text));
            Prefs.UpdateDouble("RecallAdjustDown", PIn.PDouble(textDown.Text));

            DataValid.SetInvalid(InvalidTypes.Prefs);
            DialogResult = DialogResult.OK;
        }