internal static void AddPatchManually(string xmlPath, PatchFile patch) { try { if (PatchHelper.Versions.Count == 0) { Attempt_ReadPatchFile(xmlPath); } AddPatch(patch); GeneratePatchIndex(); } catch (Exception e) { LogHandler.LogErrors(e.ToString()); } }
internal static void AddPatch(PatchFile file) { if (PatchHelper.Versions.ContainsKey(file.patchVersion)) { if (!PatchHelper.Versions[file.patchVersion].Contains(file)) { PatchHelper.Versions[file.patchVersion].Add(file); } } else { List <PatchFile> newFileList = new List <PatchFile>(); newFileList.Add(file); PatchHelper.Versions.Add(file.patchVersion, newFileList); } }
private void Add_Manually_Click(object sender, EventArgs args) { try { PatchFile file = Parse_Manual_Entry(); if (file != null) { XmlHandler.AddPatchManually(PatchHelper.PatchURL, file); UpdatePatchNotes(string.Format("New Patch Added: {0}", file.filePath)); } ClearManualPatch(); } catch (Exception e) { LogHandler.LogErrors(e.ToString()); UpdatePatchNotes(e.ToString()); } }