private void ExportListButton_Click(object sender, EventArgs e) { DialogResult result = saveFileDialog1.ShowDialog(); if (result == DialogResult.OK) { string file = saveFileDialog1.FileName; try { JSONFormatting.ExportModOrder(ModList, file); } catch (IOException) { Console.WriteLine("It's f****d"); } } }
private void ResetList() { ClearList(); if (JSONFormatting.ParseModRegistry(ModsDirectory + "\\mods_registry.json", out ListOfMods)) { GameDataJSON GDJ = new GameDataJSON(); if (JSONFormatting.ParseGameData(ModsDirectory + "\\game_data.json", out GDJ)) { DLCLoadJSON DLJ = new DLCLoadJSON(); if (JSONFormatting.ParseDLCLoadJSON(ModsDirectory + "\\dlc_load.json", out DLJ)) { CreateList(ListOfMods, GDJ, DLJ); } } } }
private void ImportListButton_Click(object sender, EventArgs e) { DialogResult result = openFileDialog1.ShowDialog(); if (result == DialogResult.OK) { string file = openFileDialog1.FileName; try { ClearList(); CustomOrderList COL = JSONFormatting.ParseCustomOrderList(file); GameDataJSON GDJ = new GameDataJSON(COL); GDJ.modsOrder.Clear(); foreach (string g in COL.modsOrderSteamID) { foreach (KeyValuePair <string, ModRegistryJSON> m in ListOfMods) { if (m.Value.steamId == g) { GDJ.modsOrder.Add(m.Value.objectKey); break; } } } GDJ.isEulaAccepted = COL.isEulaAccepted; DLCLoadJSON DLJ = new DLCLoadJSON(COL); CreateList(ListOfMods, GDJ, DLJ); } catch (IOException) { Console.WriteLine("It's f****d"); } } }
private void SaveButton_Click(object sender, EventArgs e) { JSONFormatting.SaveModOrder(ModList, ModsDirectory); }