Пример #1
0
        public override void CheckOutput()
        {
            base.CheckOutput();

            if (To.IsEmpty())
            {
                throw new ValueNotSpecifiedError("DAE-00278", "s_email_to");
            }
            if (Subject.IsEmpty())
            {
                throw new ValueNotSpecifiedError("DAE-00279", "s_subject");
            }
            if (Body.IsEmpty())
            {
                throw new ValueNotSpecifiedError("DAE-00280", "s_body");
            }

            var cfg = GlobalSettings.Pages.Email();

            cfg.CheckSettings();
            foreach (string email in To.Split(';'))
            {
                if (!IncorrectEmailError.IsValid(email))
                {
                    throw new IncorrectEmailError("DAE-00281", email);
                }
            }
        }
Пример #2
0
        private void Check()
        {
            var cfg = GlobalSettings.Pages.Email();

            cfg.CheckSettings();
            foreach (string email in emailToFrame1.EmailTo.Split(';'))
            {
                if (!IncorrectEmailError.IsValid(email))
                {
                    throw new IncorrectEmailError("DAE-00161", email);
                }
            }
        }
Пример #3
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            if (tbxName.Text.IsEmpty())
            {
                StdDialog.ShowError("s_please_fill_name");
                tbxName.Focus();
                return;
            }
            if (!IncorrectEmailError.IsValid(tbxEmail.Text))
            {
                StdDialog.ShowError(Texts.Get("s_incorrect$email", "email", tbxEmail.Text));
                tbxEmail.Focus();
                return;
            }

            DialogResult = DialogResult.OK;
            Close();
        }