Beispiel #1
0
    public static void ShowItemDialogByPosType(EPosType posType, int pos)
    {
        Dictionary <int, XItem> dict = GTDataManager.Instance.GetItemDataByPosType(posType);

        if (!dict.ContainsKey(pos))
        {
            return;
        }
        switch (posType)
        {
        case EPosType.RoleEquip:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIEquipInfo);
            UIEquipInfo window1 = (UIEquipInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIEquipInfo);
            window1.ShowViewByPos(EPosType.RoleEquip, pos);
            break;

        case EPosType.RoleGem:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIGemInfo);
            UIGemInfo window2 = (UIGemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIGemInfo);
            window2.ShowViewByPos(EPosType.RoleGem, pos);
            break;

        case EPosType.RoleFashion:
            break;

        case EPosType.RoleRune:
            break;

        case EPosType.BagItem:
            ShowItemDialogByBagType(EBagType.ITEM, pos);
            break;

        case EPosType.BagGem:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIGemInfo);
            UIGemInfo window6 = (UIGemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIGemInfo);
            window6.ShowViewByPos(EPosType.BagGem, pos);
            break;

        case EPosType.BagChip:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIChipInfo);
            UIChipInfo window7 = (UIChipInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIChipInfo);
            window7.ShowViewByPos(pos);
            break;

        case EPosType.BagFashion:

            break;

        case EPosType.BagRune:
            break;

        default:
            break;
        }
    }
Beispiel #2
0
    public static void ShowItemDialogByBagType(EBagType bagType, int pos)
    {
        Dictionary <int, XItem> dict = GTDataManager.Instance.GetBagDataByBagType(bagType);

        if (!dict.ContainsKey(pos))
        {
            return;
        }
        XItem item = dict[pos];
        DItem db   = ReadCfgItem.GetDataById(item.Id);

        switch (db.ItemType)
        {
        case EItemType.EQUIP:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIEquipInfo);
            UIEquipInfo w1 = (UIEquipInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIEquipInfo);
            w1.ShowViewByPos(EPosType.BagItem, pos);
            break;

        case EItemType.MAT:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIItemInfo);
            UIItemInfo w2 = (UIItemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIItemInfo);
            w2.ShowViewByPos(pos, false);
            break;

        case EItemType.DRUG:
        case EItemType.BOX:
        case EItemType.KEY:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIItemInfo);
            UIItemInfo w3 = (UIItemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIItemInfo);
            w3.ShowViewByPos(pos, true);
            break;

        case EItemType.EXP:
            break;

        case EItemType.CHIP:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIChipInfo);
            UIChipInfo w4 = (UIChipInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIChipInfo);
            w4.ShowViewByPos(pos);
            break;

        case EItemType.GEM:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIGemInfo);
            UIGemInfo w5 = (UIGemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIGemInfo);
            w5.ShowViewByPos(EPosType.BagGem, pos);
            break;
        }
    }