private void DownloadNext() { if (downloadQueue.Count > 0) { ThemeConfig theme = downloadQueue.Peek(); if (theme.imagesZipUri.StartsWith("file://")) { string themePath = (new Uri(theme.imagesZipUri)).LocalPath; ThemeManager.CopyLocalTheme(theme, themePath, this.UpdateTotalPercentage); downloadQueue.Dequeue(); if (!ThemeManager.importMode) { DownloadNext(); } } else { List <string> imagesZipUris = theme.imagesZipUri.Split('|').ToList(); wc.DownloadFileAsync(new Uri(imagesZipUris.First()), theme.themeId + "_images.zip", imagesZipUris.Skip(1).ToList()); } } else if (!ThemeManager.importMode) { this.Close(); } }