示例#1
0
        public RunSetActionHTMLReportSendEmailEditPage(RunSetActionHTMLReportSendEmail runSetActionHTMLReportSendEmail)
        {
            InitializeComponent();
            this.runSetActionHTMLReportSendEmail = runSetActionHTMLReportSendEmail;
            if (runSetActionHTMLReportSendEmail.Email == null)
            {
                runSetActionHTMLReportSendEmail.Email = new Email();
            }
            MailFromTextBox.Init(runSetActionHTMLReportSendEmail, RunSetActionHTMLReportSendEmail.Fields.MailFrom);
            MailToTextBox.Init(runSetActionHTMLReportSendEmail, RunSetActionHTMLReportSendEmail.Fields.MailTo);
            MailCCTextBox.Init(runSetActionHTMLReportSendEmail, RunSetActionHTMLReportSendEmail.Fields.MailCC);
            SubjectTextBox.Init(runSetActionHTMLReportSendEmail, RunSetActionHTMLReportSendEmail.Fields.Subject);

            BodyTextBox.Init(runSetActionHTMLReportSendEmail, RunSetActionHTMLReportSendEmail.Fields.Bodytext);
            CommentTextBox.Init(runSetActionHTMLReportSendEmail, RunSetActionHTMLReportSendEmail.Fields.Comments);
            BodyTextBox.AdjustHight(100);
            App.ObjFieldBinding(SMTPMailHostTextBox, TextBox.TextProperty, runSetActionHTMLReportSendEmail.Email, Email.Fields.SMTPMailHost);
            App.ObjFieldBinding(SMTPPortTextBox, TextBox.TextProperty, runSetActionHTMLReportSendEmail.Email, Email.Fields.SMTPPort);
            App.ObjFieldBinding(SMTPUserTextBox, TextBox.TextProperty, runSetActionHTMLReportSendEmail.Email, Email.Fields.SMTPUser);
            App.ObjFieldBinding(SMTPPassTextBox, TextBox.TextProperty, runSetActionHTMLReportSendEmail.Email, Email.Fields.SMTPPass);
            App.FillComboFromEnumVal(EmailMethodComboBox, runSetActionHTMLReportSendEmail.Email.EmailMethod);
            App.ObjFieldBinding(EmailMethodComboBox, ComboBox.SelectedValueProperty, runSetActionHTMLReportSendEmail.Email, Email.Fields.EmailMethod);
            App.ObjFieldBinding(cbEnableSSL, CheckBox.IsCheckedProperty, runSetActionHTMLReportSendEmail.Email, Email.Fields.EnableSSL);
            InitAttachmentsGrid();
            RadioButtonInit();
        }
        public RunSetActionHTMLReportSendEmailEditPage(RunSetActionHTMLReportSendEmail runSetActionHTMLReportSendEmail)
        {
            InitializeComponent();
            this.runSetActionHTMLReportSendEmail = runSetActionHTMLReportSendEmail;
            if (runSetActionHTMLReportSendEmail.Email == null)
            {
                runSetActionHTMLReportSendEmail.Email = new Email();
            }
            MailFromTextBox.Init(null, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.MailFrom));
            MailToTextBox.Init(null, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.MailTo));
            MailCCTextBox.Init(null, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.MailCC));
            SubjectTextBox.Init(null, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.Subject));

            BodyTextBox.Init(null, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.Bodytext));
            CommentTextBox.Init(null, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.Comments));
            BodyTextBox.AdjustHight(100);
            App.ObjFieldBinding(xSMTPPortTextBox, TextBox.TextProperty, runSetActionHTMLReportSendEmail.Email, nameof(Email.SMTPPort));
            App.ObjFieldBinding(xSMTPPassTextBox, TextBox.TextProperty, runSetActionHTMLReportSendEmail.Email, nameof(Email.SMTPPass));
            App.FillComboFromEnumVal(xEmailMethodComboBox, runSetActionHTMLReportSendEmail.Email.EmailMethod);
            xSMTPMailHostTextBox.Init(null, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.MailHost));
            xSMTPUserTextBox.Init(null, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.MailUser));
            App.ObjFieldBinding(xEmailMethodComboBox, ComboBox.SelectedValueProperty, runSetActionHTMLReportSendEmail.Email, nameof(Email.EmailMethod));
            App.ObjFieldBinding(xcbEnableSSL, CheckBox.IsCheckedProperty, runSetActionHTMLReportSendEmail.Email, nameof(Email.EnableSSL));
            App.ObjFieldBinding(xcbConfigureCredential, CheckBox.IsCheckedProperty, runSetActionHTMLReportSendEmail.Email, nameof(Email.ConfigureCredential));
            if (string.IsNullOrEmpty(runSetActionHTMLReportSendEmail.MailTo))
            {
                runSetActionHTMLReportSendEmail.MailFrom = WorkSpace.UserProfile.UserEmail;
            }
            InitAttachmentsGrid();
            RadioButtonInit();
        }
示例#3
0
        public RunSetActionHTMLReportSendEmailEditPage(RunSetActionHTMLReportSendEmail runSetActionHTMLReportSendEmail)
        {
            InitializeComponent();
            this.runSetActionHTMLReportSendEmail = runSetActionHTMLReportSendEmail;
            if (runSetActionHTMLReportSendEmail.Email == null)
            {
                runSetActionHTMLReportSendEmail.Email = new Email();
            }

            RunsetActionDeliveryMethodConfigPageFrame.Content = new RunSetActionDeliveryMethodConfigPage(runSetActionHTMLReportSendEmail.Email);
            Context context = new Context()
            {
                Environment = WorkSpace.Instance.RunsetExecutor.RunsetExecutionEnvironment
            };

            MailFromTextBox.Init(context, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.MailFrom));
            MailToTextBox.Init(context, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.MailTo));
            MailCCTextBox.Init(context, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.MailCC));
            SubjectTextBox.Init(context, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.Subject));
            BodyTextBox.Init(context, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.Bodytext));
            CommentTextBox.Init(context, runSetActionHTMLReportSendEmail, nameof(RunSetActionHTMLReportSendEmail.Comments));

            BodyTextBox.AdjustHight(100);

            if (string.IsNullOrEmpty(runSetActionHTMLReportSendEmail.MailTo))
            {
                runSetActionHTMLReportSendEmail.MailFrom = WorkSpace.Instance.UserProfile.UserEmail;
            }
            InitAttachmentsGrid();
            RadioButtonInit();
        }