/// <summary> /// The constructor of a update download form /// </summary> /// <param name="actionURL">The URL of the requested file.</param> /// <param name="actionFilename">The target path of the downloaded file of the requested file.</param> /// <param name="signatureURL">The URL of the signature of the requested file</param> /// <param name="signatureFilename">The target path of the signature of the requested file.</param> /// <param name="showCheck">Should display "do not notify me in a week" or not.</param> public FormDownload(string actionURL, string actionFilename, string signatureURL, string signatureFilename, string changelogURL,bool showCheck) { InitializeComponent(); this.Hide(); this.m_ActionURL = actionURL; this.m_ActionFilename = actionFilename; this.m_SignatureURL = signatureURL; this.m_SignatureFilename = signatureFilename; this.m_ChangeLogURL = changelogURL; this.m_webClient = new WebClient(); this.m_webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(webClient_DownloadFileCompleted); this.m_webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(webClient_DownloadProgressChanged); u_askDownload = new FormAskDownload(this, showCheck); u_askDownload.ShowDialog(); }
/// <summary> /// The constructor of a update download form /// </summary> /// <param name="actionURL">The URL of the requested file.</param> /// <param name="actionFilename">The target path of the downloaded file of the requested file.</param> /// <param name="signatureURL">The URL of the signature of the requested file</param> /// <param name="signatureFilename">The target path of the signature of the requested file.</param> /// <param name="showCheck">Should display "do not notify me in a week" or not.</param> public FormDownload(string actionURL, string actionFilename, string signatureURL, string signatureFilename, string changelogURL, bool showCheck) { InitializeComponent(); this.Hide(); this.m_ActionURL = actionURL; this.m_ActionFilename = actionFilename; this.m_SignatureURL = signatureURL; this.m_SignatureFilename = signatureFilename; this.m_ChangeLogURL = changelogURL; this.m_webClient = new WebClient(); this.m_webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(webClient_DownloadFileCompleted); this.m_webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(webClient_DownloadProgressChanged); u_askDownload = new FormAskDownload(this, showCheck); u_askDownload.ShowDialog(); }