private void UpMan_FileDownloadProgress(object sender, UpdateManager.FileProgressEventArgs e) { if (e.DownloadIndex - 1 < ProgressBars.Count) { var bar = ProgressBars[e.DownloadIndex - 1]; bar.Item2.BeginInvoke(new Action(() => bar.Item2.Value = (int)(e.Progress * 100))); } }
private void UpMan_FileDownloadCompleted(object sender, UpdateManager.FileProgressEventArgs e) { if (e.DownloadFileName == "config.xml") { CheckMusic(); SettingsButton.BeginInvoke(new Action(() => SettingsButton.Enabled = true)); } }
private void UpMan_FileDownloadStarted(object sender, UpdateManager.FileProgressEventArgs e) { PushLog("Downloading file " + e.DownloadFileName); if (e.DownloadIndex - 1 < ProgressBars.Count) { var bar = ProgressBars[e.DownloadIndex - 1]; bar.Item1.BeginInvoke(new Action(() => bar.Item1.Text = e.DownloadFileName)); bar.Item2.BeginInvoke(new Action(() => bar.Item2.Visible = true)); bar.Item2.BeginInvoke(new Action(() => bar.Item2.Value = (int)(e.Progress * 100))); } }
private void UpMan_FileDownloadError(object sender, UpdateManager.FileProgressEventArgs e) { PushLog("Downloading file " + e.DownloadFileName + " failed"); }