public GeckofxWebbrowerFrm(TaskInfoEntity taskInfoEntity, DataGridView dgv, GeckofxWebbrowerType geckofxWebbrowerType, string URL = null) { InitializeComponent(); this.taskInfoEntity = taskInfoEntity; this.dgv = dgv; this.geckofxWebbrowerType = geckofxWebbrowerType; this.URL = URL; }
public ResultFrm(SkinTabControl tabControl, TaskInfoEntity taskInfoEntity) { InitializeComponent(); init(); this.tabControl = tabControl; this.taskInfoEntity = taskInfoEntity; }
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(); }
public GeckofxFrm(SkinTabControl tabControl, TaskInfoEntity taskInfoEntity) { InitializeComponent(); comboBox = new SkinComboBox(); fieldsComboBox = new SkinComboBox(); this.tabControl = tabControl; this.taskInfoEntity = taskInfoEntity; dataGridViewEvent = new DataGridViewEvent(); init(); }
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(); }
/// <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); } }
public MDIFrmEvent() { taskInfoEntity = new TaskInfoEntity(); }