private async Task DownloadDatabase(String filename) { myDispatcher.Invoke(new Action(() => { ldScreen.SetTitleText("Retrieving last release info..."); })); LogProvider.Log("Retrieving database url from github"); String url = GithubTools.GetLastRelease(GithubTools.DATA_REPONAME); WebClient wb = new WebClient(); wb.DownloadProgressChanged += WebProgressChanged; wb.DownloadFileCompleted += WebDownloadCompleted; LogProvider.Log("Starting database download (async)"); using (wb) { await wb.DownloadFileTaskAsync(new Uri(url), filename); } }
private static Version GetRemoteDatabaseVersion() { Version v = GithubTools.GetLastVersion("UCG-Data"); return(v); }