예제 #1
0
 public VersionPackage(string displayID, string versionName, ForgePackage forgeRequirement, string downloadURL)
 {
     DisplayID        = displayID;
     VersionName      = versionName;
     ForgeRequirement = forgeRequirement;
     DownloadURL      = downloadURL;
 }
예제 #2
0
        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;
        }
예제 #3
0
 public void EnterForgeDataEntry(string forgeVersionId, string installationName)
 {
     LoadedForge = new ForgePackage(installationName, forgeVersionId);
 }