public FormAskDownload(FormDownload formDownload, bool showCheck) { InitializeComponent(); this.FormClosed += new FormClosedEventHandler(FormAskDownload_FormClosed); this.u_chk.Visible = showCheck; this.m_formDownload = formDownload; if (formDownload.ChangeLogURL == "(null)") { string html = "<html><head><meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\"></head><body>"; string locale = CultureInfo.CurrentCulture.Name; if (locale == "zh-TW") { html += "<p>Yahoo! \u5947\u6469\u5efa\u8b70\u60a8\u4e0b\u8f09\u66f4\u65b0\u7248\u672c</p>"; } else if (locale == "zh-CN") { html += "<p>Yahoo! \u5947\u6469\u5efa\u8bae\u60a8\u4e0b\u8f7d\u66f4\u65b0\u7248\u672c</p?"; } else { html += "<p>Please download the newest version of Yahoo! KeyKey.</p>"; } html += "</body></html>"; this.u_browser.DocumentText = html; } else { try { this.u_browser.Url = new Uri(formDownload.ChangeLogURL); } catch {} } this.FormClosing += new FormClosingEventHandler(FormAskDownload_FormClosing); }
public FormAskDownload(FormDownload formDownload, bool showCheck) { InitializeComponent(); this.FormClosed += new FormClosedEventHandler(FormAskDownload_FormClosed); this.u_chk.Visible = showCheck; this.m_formDownload = formDownload; if (formDownload.ChangeLogURL == "(null)") { string html = "<html><head><meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\"></head><body>"; string locale = CultureInfo.CurrentCulture.Name; if (locale == "zh-TW") html += "<p>Yahoo! \u5947\u6469\u5efa\u8b70\u60a8\u4e0b\u8f09\u66f4\u65b0\u7248\u672c</p>"; else if (locale == "zh-CN") html += "<p>Yahoo! \u5947\u6469\u5efa\u8bae\u60a8\u4e0b\u8f7d\u66f4\u65b0\u7248\u672c</p?"; else html += "<p>Please download the newest version of Yahoo! KeyKey.</p>"; html += "</body></html>"; this.u_browser.DocumentText = html; } else { try { this.u_browser.Url = new Uri(formDownload.ChangeLogURL); } catch {} } this.FormClosing += new FormClosingEventHandler(FormAskDownload_FormClosing); }
public static void DownloadUpdate(string actionURL, string actionFilename, string signatureURL, string signatureFilename, string changeLogURL, bool CheckOptionVisible) { FormDownload formDownload = new FormDownload(actionURL, actionFilename, signatureURL, signatureFilename, changeLogURL, CheckOptionVisible); Application.Run(formDownload); }