Esempio n. 1
0
 private void TraitFileSelectButton_Click(object sender, EventArgs e)
 {
     TraitReference.TraitDefinitions newDefs = ShowLoadJsonObjectDialog <TraitReference.TraitDefinitions>();
     if (LoadDialog.FileName != "")
     {
         JsonFiles.JsonFilePaths[typeof(TraitReference.TraitDefinitions).Name] = LoadDialog.FileName;
         JsonFiles.LoadFilePaths();
     }
 }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();

            UnitTypeCombo.Items.AddRange(new String[] {
                CUnit.TYPE_LIGHT_INFANTRY,
                CUnit.TYPE_HEAVY_INFANTRY,
                CUnit.TYPE_LIGHT_CAVALRY,
                CUnit.TYPE_HEAVY_CAVALRY,
                CUnit.TYPE_SIEGE_WEAPON
            });

            JsonFiles.LoadFilePaths();

            UnitDirSelectText.Text      = JsonFiles.JsonFilePaths["CUnit"];
            CommanderDirSelectText.Text = JsonFiles.JsonFilePaths["CCommander"];
            ArmyDirSelectText.Text      = JsonFiles.JsonFilePaths["CArmy"];
            BattleDirSelectText.Text    = JsonFiles.JsonFilePaths["CBattle"];

            TraitReference.LoadTraitDefinitions();

            ClearAllArmyRows();
            ClearAllTraitRows();
        }