private void llblUpdateAvailable_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (updateChecker != null && updateChecker.UpdateInfo != null && !string.IsNullOrEmpty(updateChecker.UpdateInfo.URL)) { DownloaderForm downloader = new DownloaderForm(updateChecker.UpdateInfo.URL, updateChecker.Proxy, updateChecker.UpdateInfo.Summary); downloader.ShowDialog(); if (downloader.Status == DownloaderFormStatus.InstallStarted) Application.Exit(); } }
private void llblUpdateAvailable_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (updateChecker != null && updateChecker.Status == UpdateStatus.UpdateAvailable) { using (DownloaderForm updaterForm = new DownloaderForm(updateChecker)) { updaterForm.ShowDialog(); if (updaterForm.Status == DownloaderFormStatus.InstallStarted) { Application.Exit(); } } } }
private void llblUpdateAvailable_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (updateChecker != null && updateChecker.UpdateInfo != null && updateChecker.UpdateInfo.Status == UpdateStatus.UpdateAvailable) { using (DownloaderForm updaterForm = new DownloaderForm(updateChecker)) { updaterForm.ShowDialog(); if (updaterForm.Status == DownloaderFormStatus.InstallStarted) { Application.Exit(); } } } }
public static DialogResult DownloadFFmpeg(bool async, DownloaderForm.DownloaderInstallEventHandler installRequested) { string url; if (NativeMethods.Is64Bit()) { url = "http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-latest-win64-static.7z"; } else { url = "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-latest-win32-static.7z"; } using (DownloaderForm form = new DownloaderForm(url, "ffmpeg.7z")) { form.Proxy = ProxyInfo.Current.GetWebProxy(); form.InstallType = InstallType.Event; form.RunInstallerInBackground = async; form.InstallRequested += installRequested; return form.ShowDialog(); } }
private void CheckUpdate() { if (UpdaterAck != System.Windows.Forms.DialogResult.None) { UpdateChecker updateChecker = new UpdateChecker(ZLinks.URL_UPDATE, Application.ProductName, new Version(Adapter.AssemblyVersion), Engine.ConfigUI.ReleaseChannel, Uploader.ProxySettings.GetWebProxy); updateChecker.CheckUpdate(); UpdaterAck = System.Windows.Forms.DialogResult.None; if (updateChecker.UpdateInfo != null && updateChecker.UpdateInfo.Status == UpdateStatus.UpdateRequired && !string.IsNullOrEmpty(updateChecker.UpdateInfo.URL)) { UpdaterAck = MessageBox.Show("Update found. Do you want to download it?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); if (UpdaterAck == DialogResult.Yes) { DownloaderForm downloader = new DownloaderForm(updateChecker.UpdateInfo.URL, updateChecker.Proxy, updateChecker.UpdateInfo.Summary); downloader.ShowDialog(); if (downloader.Status == DownloaderFormStatus.InstallStarted) Application.Exit(); } } } }
private void CheckUpdate() { UpdateChecker updateChecker = new UpdateChecker(ZLinks.URL_UPDATE, Application.ProductName, new Version(Program.AssemblyVersion), ReleaseChannelType.Stable, Uploader.ProxySettings.GetWebProxy); updateChecker.CheckUpdate(); if (updateChecker.UpdateInfo != null && updateChecker.UpdateInfo.Status == UpdateStatus.UpdateRequired && !string.IsNullOrEmpty(updateChecker.UpdateInfo.URL)) { if (MessageBox.Show("Update found. Do you want to download it?", "Update check", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes) { DownloaderForm downloader = new DownloaderForm(updateChecker.UpdateInfo.URL, updateChecker.Proxy, updateChecker.UpdateInfo.Summary); downloader.ShowDialog(); if (downloader.Status == DownloaderFormStatus.InstallStarted) Application.Exit(); } } }