public SoldierContainer ParseInput(string value) { SoldierContainer returnContainer = new SoldierContainer(); string[] substrings = value.Split('\n'); foreach (string s in substrings) { try { returnContainer.AddSoldier(parseSoldier(s)); } catch { } } return(returnContainer); }
private SoldierDataEntry(SoldierContainer container) { InitializeComponent(); this.container = container; this.builder = new SoldierContainerBuilder(); this.strengthEntry.Maximum = Decimal.MaxValue; this.speedEntry.Maximum = Decimal.MaxValue; this.accuracyEntry.Maximum = Decimal.MaxValue; this.mindEntry.Maximum = Decimal.MaxValue; this.closeCombatEntry.Maximum = Decimal.MaxValue; this.heavyWeaponsEntry.Maximum = Decimal.MaxValue; this.assaultWeaponsEntry.Maximum = Decimal.MaxValue; this.sniperRiflesEntry.Maximum = Decimal.MaxValue; this.highExplosivesEntry.Maximum = Decimal.MaxValue; this.hpEntry.Maximum = Decimal.MaxValue; }
public SortedSoldierTeamDataForm(SoldierContainer container) { InitializeComponent(); this.container = container; }
private void loadButton_Click(object sender, EventArgs e) { this.container = this.builder.ParseInput(this.listOfSoldiers.Text); }
private void ListOfSoldiers_TextChanged(object sender, EventArgs e) { this.container = this.builder.ParseInput(this.listOfSoldiers.Text); }