Exemplo n.º 1
0
 public GeckofxWebbrowerFrm(TaskInfoEntity taskInfoEntity, DataGridView dgv, GeckofxWebbrowerType geckofxWebbrowerType, string URL = null)
 {
     InitializeComponent();
     this.taskInfoEntity       = taskInfoEntity;
     this.dgv                  = dgv;
     this.geckofxWebbrowerType = geckofxWebbrowerType;
     this.URL                  = URL;
 }
Exemplo n.º 2
0
        public ResultFrm(SkinTabControl tabControl, TaskInfoEntity taskInfoEntity)
        {
            InitializeComponent();
            init();

            this.tabControl     = tabControl;
            this.taskInfoEntity = taskInfoEntity;
        }
Exemplo n.º 3
0
        public ThemeFrmTwo(SkinTabControl tabControl, TaskInfoEntity taskInfoEntity)
        {
            InitializeComponent();
            this.tabControl     = tabControl;
            this.taskInfoEntity = taskInfoEntity;

            init();
        }
        public GeckofxDetailedFrm(SkinTabControl tabControl, TaskInfoEntity taskInfoEntity)
        {
            InitializeComponent();
            comboBox            = new SkinComboBox();
            fieldsComboBox      = new SkinComboBox();
            this.tabControl     = tabControl;
            this.taskInfoEntity = taskInfoEntity;

            init();
        }
Exemplo n.º 5
0
        public GeckofxFrm(SkinTabControl tabControl, TaskInfoEntity taskInfoEntity)
        {
            InitializeComponent();
            comboBox       = new SkinComboBox();
            fieldsComboBox = new SkinComboBox();

            this.tabControl     = tabControl;
            this.taskInfoEntity = taskInfoEntity;
            dataGridViewEvent   = new DataGridViewEvent();

            init();
        }
Exemplo n.º 6
0
        private string URL;                       //要执行的URL链接


        //通用
        public GeckofxWebbrower(Control control, DataGridView dgv, TaskInfoEntity taskInfoEntity, GeckofxWebbrowerType geckofxType, string URL)
        {
            //GeckoPreferences.User["gfx.font_rendering.graphite.enabled"] = false;
            geckoWebBrowser        = new GeckoWebBrowser();
            geckoWebBrowser.Parent = control;
            geckoWebBrowser.Dock   = DockStyle.Fill;

            this.taskInfoEntity = taskInfoEntity;
            this.control        = control;
            this.dgv            = dgv;
            this.geckofxType    = geckofxType; // 浏览类型
            ruleStyle           = new RuleStyle();
            xpathHelper         = new XpathHelper();
            this.URL            = URL;

            init();
        }
Exemplo n.º 7
0
        /// <summary>
        /// 发送邮件
        /// </summary>
        /// <param name="emailInfo"></param>
        /// <param name="taskInfo"></param>
        /// <param name="result"></param>
        /// <returns></returns>
        private static async Task SendEmail(EmailEntity emailInfo, TaskInfoEntity taskInfo, string result)
        {
            var message = new MimeMessage();

            message.From.Add(new MailboxAddress(emailInfo.Address));
            message.To.Add(new MailboxAddress(taskInfo.UserName, taskInfo.UserEmail));
            message.Subject = $"报警邮件,任务:{taskInfo.Name}";
            var body = new BodyBuilder {
                HtmlBody = result
            };

            message.Body = body.ToMessageBody();
            using (var client = new SmtpClient())
            {
                client.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true;
                client.Connect(emailInfo.Smtp, emailInfo.Port, false);
                client.AuthenticationMechanisms.Remove("XOAUTH2");
                client.Authenticate(emailInfo.User, emailInfo.Pass);
                await client.SendAsync(message);

                client.Disconnect(true);
            }
        }
Exemplo n.º 8
0
 public MDIFrmEvent()
 {
     taskInfoEntity = new TaskInfoEntity();
 }