Esempio n. 1
0
 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)));
     }
 }
Esempio n. 2
0
 private void UpMan_FileDownloadCompleted(object sender, UpdateManager.FileProgressEventArgs e)
 {
     if (e.DownloadFileName == "config.xml")
     {
         CheckMusic();
         SettingsButton.BeginInvoke(new Action(() => SettingsButton.Enabled = true));
     }
 }
Esempio n. 3
0
        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)));
            }
        }
Esempio n. 4
0
 private void UpMan_FileDownloadError(object sender, UpdateManager.FileProgressEventArgs e)
 {
     PushLog("Downloading file " + e.DownloadFileName + " failed");
 }