예제 #1
0
        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);
        }
예제 #2
0
        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;
 }
예제 #4
0
 private void loadButton_Click(object sender, EventArgs e)
 {
     this.container = this.builder.ParseInput(this.listOfSoldiers.Text);
 }
예제 #5
0
 private void ListOfSoldiers_TextChanged(object sender, EventArgs e)
 {
     this.container = this.builder.ParseInput(this.listOfSoldiers.Text);
 }