public static void DownloadUpdates(string[] updates) { int i = 0; int n = updates.Length; using (WebClient wc = new WebClient()) { for (int u = updates.Length - 1; u >= 0; u--) { i++; Application.Current.Dispatcher.Invoke(() => LoadingProgress?.Invoke(i, n)); UnzipFromStream(wc.OpenRead(GetUpdateFileLink(updates[u])), FormExecution.path); } } Application.Current.Dispatcher.Invoke(() => UpdateCompleted?.Invoke()); FormExecution.ClientConfig.CardsStuffVersion = FormExecution.GetLastVersion(updates); FormExecution.SaveConfig(); }