private void RepositoryListDownload() { string trans; try { string data; using (WebClient wc = new WebClient()) { wc.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.NoCacheNoStore); wc.Headers["User-Agent"] = "Triggernometry Repository List Downloader"; byte[] rawdata = wc.DownloadData(@"https://raw.githubusercontent.com/paissaheavyindustries/Triggernometry/master/Repositories/manifest.xml?temp=" + DateTime.Now.Ticks); data = Encoding.UTF8.GetString(rawdata); } RepositoryList rl = RepositoryList.Unserialize(data); if (rl == null) { throw new InvalidOperationException(I18n.Translate("RepositoryListForm/masterlistproblem", "Data from master repository list could not be unserialized")); } ParseRepositoryList(rl); trans = I18n.Translate("RepositoryListForm/downloadcomplete", "Download complete"); plug.FilteredAddToLog(Plugin.DebugLevelEnum.Info, trans); ShowProgress(100, trans); System.Threading.Thread.Sleep(2000); ShowProgress(0, ""); } catch (Exception ex) { trans = I18n.Translate("RepositoryListForm/exception", "Download failed due to exception: {0}", ex.Message); plug.FilteredAddToLog(Plugin.DebugLevelEnum.Error, trans); ShowProgress(100, trans); } }