private void RefreshAll() { List <Repo> reponames = new List <Repo>(); foreach (Repo r in repos) { reponames.Add(r); } repos.Clear(); RefreshBar.Value = 0; foreach (Repo r in reponames) { RefreshProgress.SetProgressNoAnimation(0); repos.Add(new Repo(r.url, RefreshProgress, r.srchdir, r.debloc)); RefreshProgress.SetProgressNoAnimation(100); int newval = RefreshBar.Value + (100 / reponames.Count); if (newval > 100) { RefreshBar.SetProgressNoAnimation(100); } else { RefreshBar.SetProgressNoAnimation(newval); } } RefreshBar.SetProgressNoAnimation(100); }
private void Refresh_Click(object sender, EventArgs e) { RefreshProgress.SetProgressNoAnimation(0); try { AddRepo(EnterRepo.Text); } catch (System.Net.WebException ex) { RefreshProgress.SetProgressNoAnimation(100); MessageBox.Show("Make sure you entered a valid repo, must start with http:// or https://, Error " + ex); return; } RefreshProgress.SetProgressNoAnimation(50); ReloadRepos(); RefreshProgress.SetProgressNoAnimation(100); }
private void Defrep_Click(object sender, EventArgs e) { RefreshProgress.SetProgressNoAnimation(0); DefaultRepos popup = new DefaultRepos(); try { popup.ShowDialog(); if (!popup.chosen.MultiOrEquals("", null)) { MessageBox.Show("This will take a very very long time"); string url = ""; string decloc = ""; string srchdir = "main/binary-iphoneos-arm/"; string dist = "/dists/stable/"; switch (popup.chosen) { case "bigboss": url = "http://apt.thebigboss.org/repofiles/cydia"; decloc = url; break; case "modmyi": url = "http://apt.modmyi.com"; decloc = url; break; case "saurik": url = "http://apt.saurik.com/dists/ios"; srchdir = "/main/binary-iphoneos-arm/"; dist = ""; decloc = "http://apt.saurik.com/"; break; default: url = ""; break; } if (url != "") { Adddefault(url, decloc, srchdir, dist); } ReloadRepos(); RefreshProgress.SetProgressNoAnimation(100); } } catch (System.ObjectDisposedException ex) { MessageBox.Show("{0} disposed at Defrep_click()", ex.ObjectName); } }
private void RefreshAll() { List <Repo> reponames = new List <Repo>(); foreach (Repo r in repos) { reponames.Add(r); } repos.Clear(); foreach (Repo r in reponames) { RefreshProgress.SetProgressNoAnimation(0); repos.Add(new Repo(r.url, RefreshProgress, r.srchdir, r.debloc)); RefreshProgress.SetProgressNoAnimation(100); } }