Esempio n. 1
0
        // ============================ Item Template ============================ \\

        private void ItemSearch(string ItemOrDisplayID)
        {
            ClearAll(this);
            if (cbx_ParseXMLData.Checked)
            {
                ItemDisplayInfo = loader.loadItemTemplateById(ItemOrDisplayID);
                cbx_DisplayID.Items.Clear();

                if (ItemDisplayInfo == null)
                {
                    return;
                }
                foreach (KeyValuePair <string, string> attribute in ItemDisplayInfo)
                {
                    switch (attribute.Key)
                    {
                    case "entry":
                        txt_ItemID.Text = attribute.Value;
                        break;

                    case "name":
                        txt_ItemName.Text = attribute.Value;
                        break;

                    case "DisplayID":
                        if (attribute.Value != "0")
                        {
                            cbx_DisplayID.Items.Add(attribute.Value);
                            cbx_DisplayID.Text = attribute.Value;
                        }
                        break;

                    case "DisplayID_1":
                        if (attribute.Value != "0")
                        {
                            cbx_DisplayID.Items.Add(attribute.Value);
                        }
                        break;

                    case "DisplayID_2":
                        if (attribute.Value != "0")
                        {
                            cbx_DisplayID.Items.Add(attribute.Value);
                        }
                        break;

                    case "DisplayID_3":
                        if (attribute.Value != "0")
                        {
                            cbx_DisplayID.Items.Add(attribute.Value);
                        }
                        break;

                    case "DisplayID_4":
                        if (attribute.Value != "0")
                        {
                            cbx_DisplayID.Items.Add(attribute.Value);
                        }
                        break;

                    case "icon":
                        txtm_inventoryIcon.Text = attribute.Value;
                        break;

                    case "icon_2":
                        // if (attribute.Value != "")
                        txtm_inventoryIcon.Text = attribute.Value;
                        break;

                    case "quality":
                        txt_ItemQuality.Text = attribute.Value;
                        break;

                    case "class":
                        txt_ItemClass.Text = Math.Abs(int.Parse(attribute.Value)).ToString();
                        break;

                    case "subclass":
                        txt_ItemSubClass.Text = Math.Abs(int.Parse(attribute.Value)).ToString();
                        break;

                    case "InventorySlot":
                        txt_ItemInventorySlot.Text = attribute.Value;
                        break;

                    case "Material":
                        txt_ItemMaterial.Text = attribute.Value;
                        break;

                    case "Sheath":
                        txt_ItemSheath.Text = attribute.Value;
                        break;

                    case "SoundOverrideSubclass":
                        txt_SoundOverride.Text = attribute.Value;
                        break;

                    case "level":
                        txt_ItemLevel.Text = attribute.Value;
                        break;
                    }
                    // Console.WriteLine("Key = {0}, Value = {1}", attribute.Key, attribute.Value);
                }
            }
        }