public VersionPackage(string displayID, string versionName, ForgePackage forgeRequirement, string downloadURL) { DisplayID = displayID; VersionName = versionName; ForgeRequirement = forgeRequirement; DownloadURL = downloadURL; }
private void InitializeMainForm() { Library.Initialize(); InitializeDefaults(); Manifest = JsonConvert.DeserializeObject <Manifest>(File.ReadAllText(Library.VFCManifestFilePath)); InitializeForgeDropdown(); InitializeModDropdown(); ResetMainForm(); if (Directory.Exists(Library.VFCDirectory) == true) { if (File.Exists(Library.VFCDirectory + "\\settings.conf") == true) { Options = JsonConvert.DeserializeObject <OptionsConfigFile>(File.ReadAllText(Library.VFCDirectory + "\\settings.conf")); SelectedSaveDirectory = Options.SavePathDirectory; } else if (File.Exists(Library.VFCDirectory + "\\config.json") == true) { Options = JsonConvert.DeserializeObject <OptionsConfigFile>(File.ReadAllText(Library.VFCDirectory + "\\config.json")); string optionsFile = JsonConvert.SerializeObject(Options, Formatting.Indented); File.WriteAllText(Library.VFCDirectory + "\\settings.conf", optionsFile); File.Delete(Library.VFCDirectory + "\\config.json"); } else { Options = new OptionsConfigFile(); string optionsFile = JsonConvert.SerializeObject(Options, Formatting.Indented); File.WriteAllText(Library.VFCDirectory + "\\settings.conf", optionsFile); } } else { Directory.CreateDirectory(Library.VFCDirectory); Options = new OptionsConfigFile(); string optionsFile = JsonConvert.SerializeObject(Options, Formatting.Indented); File.WriteAllText(Library.VFCDirectory + "\\settings.conf", optionsFile); } LoadedForge = null; }
public void EnterForgeDataEntry(string forgeVersionId, string installationName) { LoadedForge = new ForgePackage(installationName, forgeVersionId); }