Exemplo n.º 1
0
            private void _Traverse(AlignmentBox ab)
            {
                foreach (Box b in ab.Boxes)
                {
                    EWPF.Fixup(b, _traverseType);
                }

                Leaf();
            }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public HeroControl()
        {
            InitializeComponent();

            Spells     = new List <Spell>();
            SpellLevel = 1;

            // Alignments
            AlignmentBox.BeginUpdate();
            AlignmentBox.DataSource = Enum.GetValues(typeof(EntityAlignment));
            AlignmentBox.EndUpdate();

            // Races
            RaceBox.BeginUpdate();
            RaceBox.DataSource = Enum.GetValues(typeof(HeroRace));
            RaceBox.EndUpdate();

            // Back pack
            // Put slot id in the Tag element of the Button
            BackPack1Box.Tag  = 0;
            BackPack2Box.Tag  = 1;
            BackPack3Box.Tag  = 2;
            BackPack4Box.Tag  = 3;
            BackPack5Box.Tag  = 4;
            BackPack6Box.Tag  = 5;
            BackPack7Box.Tag  = 6;
            BackPack8Box.Tag  = 7;
            BackPack9Box.Tag  = 8;
            BackPack10Box.Tag = 9;
            BackPack11Box.Tag = 10;
            BackPack12Box.Tag = 11;
            BackPack13Box.Tag = 12;
            BackPack14Box.Tag = 13;

            HelmetBox.Tag    = InventoryPosition.Helmet;
            PrimaryBox.Tag   = InventoryPosition.Primary;
            SecondaryBox.Tag = InventoryPosition.Secondary;
            ArmorBox.Tag     = InventoryPosition.Armor;
            WristBox.Tag     = InventoryPosition.Wrist;
            LeftRingBox.Tag  = InventoryPosition.Ring_Left;
            RightRingBox.Tag = InventoryPosition.Ring_Right;
            FeetBox.Tag      = InventoryPosition.Feet;
            NeckBox.Tag      = InventoryPosition.Neck;

            Waist1Box.Tag = -1;
            Waist2Box.Tag = -2;
            Waist3Box.Tag = -3;
        }