Пример #1
0
        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");
                }
            }
        }
Пример #2
0
 public GameDataJSON(CustomOrderList COL)
 {
     modsOrder      = new List <string>(COL.modsOrder);
     isEulaAccepted = COL.isEulaAccepted;
 }
Пример #3
0
 public DLCLoadJSON(CustomOrderList COL)
 {
     disabled_dlcs = new List <string>(COL.disabled_dlcs);
     enabled_mods  = new List <string>(COL.enabled_mods);
 }