internal void ReadSettings() { Task.Delay(618); //All Hail Phi if (XmlHandler.CanReadSettings("settings.xml")) { Invoke(new MethodInvoker(delegate { patch_file_box.Text = PatchHelper.PatchURL; master_uri_box.Text = PatchHelper.MasterURL; version_box.Text = PatchHelper.VersionURL; bg_img_box.Text = PatchHelper.BackgroundURL; update_log_loc.Text = PatchHelper.UpdateLogURL; manual_ver_box.Text = PatchHelper.VersionString(); VersionLabel.Text = PatchHelper.VersionString(); })); } else { LogHandler.LogErrors("Error: Unable to read or find settings.xml"); } }
internal static void GenerateDifferenceIndex(BuildHandler handler) { try { DifferenceIndex.Clear(); foreach (KeyValuePair <string, long> kvp in WebCache) { handler.UserInterface.UpdateProgressBar(); string[] addressSplit = kvp.Key.Split('/'); string name = addressSplit[addressSplit.Length - 1]; if (!LocalCache.ContainsKey(name)) { handler.UserInterface.UpdatePatchNotes (string.Format("Unable to find local match for: {0}", name)); if (!DifferenceIndex.Contains(new PatchFile(kvp.Key, name, kvp.Value, PatchHelper.VersionString()))) { DifferenceIndex.Add(new PatchFile(kvp.Key, name, kvp.Value, PatchHelper.VersionString())); } } else if (LocalCache.ContainsKey(name)) { if (LocalCache.ContainsKey(kvp.Key) && kvp.Value != LocalCache[kvp.Key]) { handler.UserInterface.UpdatePatchNotes (string.Format("File Size Difference Found For: {0}", kvp.Key)); if (!DifferenceIndex.Contains(new PatchFile(kvp.Key, name, kvp.Value, PatchHelper.VersionString()))) { DifferenceIndex.Add(new PatchFile(kvp.Key, name, kvp.Value, PatchHelper.VersionString())); } } } } } catch (Exception e) { LogHandler.LogErrors(e.ToString(), handler); } }