Esempio n. 1
0
        private void virtualRegion_RegionEntered(int id, int x, int y, int key)
        {
            Image image = null;

            if (id == 1)
            {//1一定是heroskill
                image = HeroPowerBook.GetPreview(key);
            }
            else
            {
                if (key > 0)
                {
                    var cellType = cellTypeList[id - 2];
                    if (cellType == PictureRegionCellType.Card)
                    {
                        image = CardAssistant.GetCard(key).GetPreview(CardPreviewType.Normal, new int[] { });
                    }
                    else if (cellType == PictureRegionCellType.Item)
                    {
                        image = HItemBook.GetPreview(key);
                    }
                    else if (cellType == PictureRegionCellType.Equip)
                    {
                        Equip equip = new Equip(key);
                        image = equip.GetPreview();
                    }
                }
            }
            if (image != null)
            {
                tooltip.Show(image, this, x, y);
            }
        }
Esempio n. 2
0
 private void virtualRegion_RegionEntered(int info, int mx, int my, int key)
 {
     if (equipId > 0)
     {
         Equip equip = new Equip(equipId);
         Image image = equip.GetPreview();
         tooltip.Show(image, parent, mx, my, equipId);
     }
 }
Esempio n. 3
0
        void virtualRegion_RegionEntered(int id, int x, int y, int key)
        {
            Image image   = null;
            var   isEquip = ConfigIdManager.IsEquip(itemid);

            if (!isEquip)
            {
                image = HItemBook.GetPreview(itemid);
            }
            else
            {
                Equip equip = new Equip(itemid);
                image = equip.GetPreview();
            }
            toolTip.Show(image, this, 108, 44);
        }
Esempio n. 4
0
 private void virtualRegion_RegionEntered(int info, int mx, int my, int key)
 {
     if (info == 1 && itemId > 0)
     {
         Image image   = null;
         var   isEquip = ConfigIdManager.IsEquip(itemId);
         if (!isEquip)
         {
             image = HItemBook.GetPreview(itemId);
         }
         else
         {
             Equip equip = new Equip(itemId);
             image = equip.GetPreview();
         }
         tooltip.Show(image, parent, mx, my, itemId);
     }
 }
Esempio n. 5
0
        private void virtualRegion_RegionEntered(int id, int x, int y, int key)
        {
            if (selectTar >= 0)//已经点起了一个装备,不显示tip了
            {
                return;
            }

            Image image = null;
            if (id < 10)
            {
                var itemId = UserProfile.InfoEquip.Equipon[id-1].BaseId;
                if (itemId != 0)
                {
                    Equip equip = new Equip(itemId);
                    equip.Dura = UserProfile.InfoEquip.Equipon[id - 1].Dura;
                    equip.ExpireTime = UserProfile.InfoEquip.Equipon[id - 1].ExpireTime;
                    image = equip.GetPreview();
                }
            }
            else if (id < 20)
            {
                image = GetAttrPreview(id-10);
            }
            else if(id>=20)
            {
                var itemId = UserProfile.InfoEquip.Equipoff[id - 20].BaseId;
                if (itemId != 0)
                {
                    Equip equip = new Equip(itemId);
                    equip.Dura = UserProfile.InfoEquip.Equipoff[id - 20].Dura;
                    equip.ExpireTime = UserProfile.InfoEquip.Equipoff[id - 20].ExpireTime;
                    image = equip.GetPreview();
                }
            }

            if (image != null)
            {
                tooltip.Show(image, this, x, y);
            }
            else
            {
                tooltip.Hide(this);
            }
        }
Esempio n. 6
0
 private void virtualRegion_RegionEntered(int info, int mx, int my, int key)
 {
     if (info == 1 && productId > 0)
     {
         GameShopConfig gameShopConfig = ConfigData.GetGameShopConfig(productId);
         Image          image          = null;
         var            isEquip        = ConfigIdManager.IsEquip(gameShopConfig.ItemId);
         if (!isEquip)
         {
             image = HItemBook.GetPreview(gameShopConfig.ItemId);
         }
         else
         {
             Equip equip = new Equip(gameShopConfig.ItemId);
             image = equip.GetPreview();
         }
         tooltip.Show(image, parent, mx, my, gameShopConfig.ItemId);
     }
 }
Esempio n. 7
0
        private void virtualRegion_RegionEntered(int id, int x, int y, int key)
        {
            if (key == 0)
            {
                return;
            }

            Image image = null;

            if (id >= 2)
            {
                image = HItemBook.GetPreview(key);
            }
            else
            {
                Equip equip = new Equip(key);
                image = equip.GetPreview();
            }

            tooltip.Show(image, this, x, y);
        }
Esempio n. 8
0
 private void virtualRegion_RegionEntered(int id, int x, int y, int key)
 {
     {
         var region = vRegion.GetRegion(id) as PictureRegion;
         if (region != null)
         {
             var regionType = region.GetVType();
             if (regionType == PictureRegionCellType.Item)
             {
                 Image image = HItemBook.GetPreview(key);
                 tooltip.Show(image, parent, x, y);
             }
             else if (regionType == PictureRegionCellType.Equip)
             {
                 Equip equip = new Equip(key);
                 Image image = equip.GetPreview();
                 tooltip.Show(image, parent, x, y);
             }
             else if (regionType == PictureRegionCellType.Bless)
             {
                 Image image = BlessBook.GetPreview(key);
                 tooltip.Show(image, parent, x, y);
             }
             else if (regionType == PictureRegionCellType.People)
             {
                 Image image = PeopleBook.GetPreview(key);
                 tooltip.Show(image, parent, x, y);
             }
         }
     }
     {
         var region = vRegion.GetRegion(id) as ImageRegion;
         if (region != null)
         {
             var regionType = region.GetVType();
             if (regionType == ImageRegionCellType.Gold)
             {
                 string resStr = string.Format("黄金:{0}", region.Parm);
                 Image  image  = DrawTool.GetImageByString(resStr, 100);
                 tooltip.Show(image, parent, x, y);
             }
             else if (regionType == ImageRegionCellType.Food)
             {
                 string resStr = string.Format("食物:{0}", region.Parm);
                 Image  image  = DrawTool.GetImageByString(resStr, 100);
                 tooltip.Show(image, parent, x, y);
             }
             else if (regionType == ImageRegionCellType.Health)
             {
                 string resStr = string.Format("生命:{0}", region.Parm);
                 Image  image  = DrawTool.GetImageByString(resStr, 100);
                 tooltip.Show(image, parent, x, y);
             }
             else if (regionType == ImageRegionCellType.Mental)
             {
                 string resStr = string.Format("精神:{0}", region.Parm);
                 Image  image  = DrawTool.GetImageByString(resStr, 100);
                 tooltip.Show(image, parent, x, y);
             }
             else if (regionType == ImageRegionCellType.Exp)
             {
                 string resStr = string.Format("经验值:{0}", region.Parm);
                 Image  image  = DrawTool.GetImageByString(resStr, 100);
                 tooltip.Show(image, parent, x, y);
             }
         }
     }
 }