Ejemplo n.º 1
0
        private void SetFixedValuesToCombosAndLists()
        {
            List <object>           attr1            = new List <object>(ValueHelper.itemAttributes);
            List <object>           attr2            = new List <object>(ValueHelper.itemAttributes);
            List <object>           attr3            = new List <object>(ValueHelper.itemAttributes);
            List <object>           attr4            = new List <object>(ValueHelper.itemAttributes);
            List <CharactersHelper> addItemCharCombo = new List <CharactersHelper>(ValueHelper.GetCharacterValues());
            List <CharactersHelper> unlockCharacters = new List <CharactersHelper>(ValueHelper.GetCharacterValues());

            addItemCharCombo.RemoveAt(0);             //remove a opção 'todos'
            List <CharactersHelper> searchItemCharCombo = new List <CharactersHelper>(ValueHelper.GetCharacterValues());

            combo_Grade.DataSource                 = ValueHelper.itemGrades;
            combo_Grade.DisplayMember              = "name";
            combo_Grade.ValueMember                = "grade";
            combo_ItemAttr1.DataSource             = attr1;
            combo_ItemAttr1.DisplayMember          = "name";
            combo_ItemAttr1.ValueMember            = "idAttr";
            combo_ItemAttr2.DataSource             = attr2;
            combo_ItemAttr2.DisplayMember          = "name";
            combo_ItemAttr2.ValueMember            = "idAttr";
            combo_ItemAttr3.DataSource             = attr3;
            combo_ItemAttr3.DisplayMember          = "name";
            combo_ItemAttr3.ValueMember            = "idAttr";
            combo_ItemAttr4.DataSource             = attr4;
            combo_ItemAttr4.DisplayMember          = "name";
            combo_ItemAttr4.ValueMember            = "idAttr";
            combo_ItemCharType.DataSource          = addItemCharCombo;
            combo_ItemCharType.DisplayMember       = "name";
            combo_ItemCharType.ValueMember         = "charType";
            combo_SearchItemCharType.DataSource    = searchItemCharCombo;
            combo_SearchItemCharType.DisplayMember = "name";
            combo_SearchItemCharType.ValueMember   = "charType";
            combo_UnlockCharacter.DataSource       = unlockCharacters;
            combo_UnlockCharacter.DisplayMember    = "name";
            combo_UnlockCharacter.ValueMember      = "charType";
            listBox_FoundItems.DisplayMember       = "ItemText";
            listBox_FoundItems.ValueMember         = "GoodsID";
        }