Example #1
0
 private void RefreshDivisionTraitDescriptionList()
 {
     ArmyUnitDetailText.Text = "";
     foreach (KeyValuePair <String, int> trait in divisionSelectedUnitType.Traits)
     {
         ArmyUnitDetailText.Text = ArmyUnitDetailText.Text + TraitReference.GetFullTraitDescription(trait.Key, trait.Value) + "\r\n";
     }
 }
Example #2
0
        private void RefreshTraitDescriptionList(object sender, EventArgs e)
        {
            UnitCreateTraitDetailText.Text = "";
            for (int row = 0; row < UnitTraitsTable.RowCount; row++)
            {
                TextBox       newTextBox = (TextBox)(UnitTraitsTable.Controls[TRAIT_NAME_CONTROL_PREFIX + row.ToString()]);
                NumericUpDown newNumeric = (NumericUpDown)(UnitTraitsTable.Controls[TRAIT_VALUE_CONTROL_PREFIX + row.ToString()]);
                String        name       = newTextBox.Text;
                int           value      = (int)newNumeric.Value;

                UnitCreateTraitDetailText.Text = UnitCreateTraitDetailText.Text + TraitReference.GetFullTraitDescription(name, value) + "\r\n";
            }
        }
Example #3
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();
        }