Example #1
0
File: Form1.cs Project: rNdm74/C-
        private void initMonster()
        {
            // Instaniate the factory
            makerFactory = new MakerFactory();

            // Add characters to the combo boxes
            foreach (var character in CHARACTERS)
            {
                cbHead.Items.Add(character);
                cbBody.Items.Add(character);
                cbLegs.Items.Add(character);
            }

            // Display the first item in collection
            cbHead.Text = (string)cbHead.Items[0];
            cbBody.Text = (string)cbBody.Items[0];
            cbLegs.Text = (string)cbLegs.Items[0];
        }
Example #2
0
        private void initMonster()
        {
            // Instaniate the factory
            makerFactory = new MakerFactory();

            // Add characters to the combo boxes
            foreach (var character in CHARACTERS)
            {
                cbHead.Items.Add(character);
                cbBody.Items.Add(character);
                cbLegs.Items.Add(character);
            }

            // Display the first item in collection
            cbHead.Text = (string)cbHead.Items[0];
            cbBody.Text = (string)cbBody.Items[0];
            cbLegs.Text = (string)cbLegs.Items[0];
        }