コード例 #1
0
        private void AddAttribute(ItemMemoryInfo selectedItem, string attCode)
        {
            List <AttributeMemoryInfo> attList = selectedItem.ItemAttList;
            AttributeMemoryInfo        attInfo = new AttributeMemoryInfo();

            attInfo.Code = attCode;
            attList.Add(attInfo);
            selectedItem.ItemAttList = attList;
            LoadItemAttributesOnClick();
        }
コード例 #2
0
        private void AddAttribute(string attCode, int count)
        {
            List <AttributeMemoryInfo> attList = weaponInfo.ItemAttList;

            for (int i = 0; i < count; i++)
            {
                AttributeMemoryInfo attInfo = new AttributeMemoryInfo();
                attInfo.Code = attCode;
                attList.Add(attInfo);
            }
            weaponInfo.ItemAttList = attList;
            DataBinding();
            isEdit = true;
        }
コード例 #3
0
        private void DeleteItemAttribute()
        {
            ItemMemoryInfo             itemInfo          = (ItemMemoryInfo)lvMain.SelectedItems[0].Tag;
            List <AttributeMemoryInfo> itemAttList       = itemInfo.ItemAttList;
            AttributeMemoryInfo        selectedAttribute = (AttributeMemoryInfo)comboExistingAttList.SelectedItem;

            foreach (AttributeMemoryInfo att in itemAttList)
            {
                if (att.Code.ToUpper() == selectedAttribute.Code.ToUpper())
                {
                    itemAttList.Remove(att);
                    break;
                }
            }

            itemInfo.ItemAttList      = itemAttList;
            this.txtPropAttCount.Text = itemAttList.Count.ToString();
            if (itemAttList.Count <= 0)
            {
                this.txtPropSelectedAttributeHexCode.Text = "";
            }
            LoadItemAttributesOnClick();
        }
コード例 #4
0
        private void ComboAttList_SelectedIndexChanged(object sender, EventArgs e)
        {
            AttributeMemoryInfo itemAttribute = (AttributeMemoryInfo)comboExistingAttList.SelectedItem;

            this.txtPropSelectedAttributeHexCode.Text = itemAttribute.Code;
        }