Example #1
0
        }                                //中心图片缩放

        public override void ShowTip(ImageToolTip tooltip, Control form, int x, int y)
        {
            var regionType = GetVType();

            if (regionType == PictureRegionCellType.Item)
            {
                Image image = HItemBook.GetPreview(nid);
                tooltip.Show(image, form, x, y);
            }
            else if (regionType == PictureRegionCellType.Gismo)
            {
                Image image = DungeonBook.GetPreview(nid);
                tooltip.Show(image, form, x, y);
            }
            else if (regionType == PictureRegionCellType.People)
            {
                Image image = SamuraiBook.GetPreview(nid);
                tooltip.Show(image, form, x, y);
            }
            else if (regionType == PictureRegionCellType.DungeonItem)
            {
                var   itemConfig = ConfigData.GetDungeonItemConfig(nid);
                Image image      = DrawTool.GetImageByString(itemConfig.Name + "$" + itemConfig.Des, 160);
                tooltip.Show(image, form, x, y);
            }
        }
Example #2
0
        void virtualRegion_RegionEntered(int id, int x, int y, int key)
        {
            Image image = null;

            image = HItemBook.GetPreview(itemid);
            toolTip.Show(image, this, 108, 44);
        }
Example #3
0
        private void ItemView_MouseMove(object sender, MouseEventArgs e)
        {
            int truex = e.X - 6;
            int truey = e.Y - 36;

            if (truex > 5 && truey > 3 && truex < 315 + 5 && truey < 318 + 3)
            {
                int temp = (truex - 8) * 10 / 315 + (truey - 5) * 10 / 318 * 10;
                if (temp != tar)
                {
                    tar = temp;
                    if (baseid + tar < UserProfile.InfoBag.BagCount && UserProfile.InfoBag.Items[baseid + tar].Type != 0)
                    {
                        Image image = HItemBook.GetPreview(UserProfile.InfoBag.Items[baseid + tar].Type);
                        tooltip.Show(image, this, (tar % 10) * 315 / 10 + 42, (tar / 10) * 318 / 10 + 42);
                    }
                    else
                    {
                        tooltip.Hide(this);
                    }
                    Invalidate(new Rectangle(6, 36, 324, 324));
                }
            }
            else
            {
                tar = -1;
                tooltip.Hide(this);
                Invalidate(new Rectangle(6, 36, 324, 324));
            }
        }
Example #4
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);
            }
        }
Example #5
0
        private void ItemView_MouseMove(object sender, MouseEventArgs e)
        {
            int temp  = -1;
            int index = -1;

            foreach (MiniItemViewItem item in items)
            {
                if (item.IsInArea(e.X, e.Y))
                {
                    temp  = item.itemPos;
                    index = item.Id - 1;
                    break;
                }
            }

            if (temp != tar)
            {
                tar = temp;
                if (tar != -1)
                {
                    Image image = HItemBook.GetPreview(UserProfile.InfoBag.Items[tar].Type);
                    tooltip.Show(image, this, (index % 2) * 30 - image.Width + 2, (index / 2) * 35 + 3);
                }
                else
                {
                    tooltip.Hide(this);
                }
            }
        }
Example #6
0
 private void virtualRegion_RegionEntered(int id, int x, int y, int key)
 {
     if (key > 10)
     {
         Image image = HItemBook.GetPreview(key);
         tooltip.Show(image, this, x, y);
     }
 }
Example #7
0
 private void virtualRegion_RegionEntered(int info, int mx, int my, int key)
 {
     if (itemId > 0)
     {
         Image image = HItemBook.GetPreview(itemId);
         tooltip.Show(image, parent, mx, my, itemId);
     }
 }
Example #8
0
 private void virtualRegion_RegionEntered(int id, int x, int y, int key)
 {
     if (key > 0)
     {
         Image image = HItemBook.GetPreview(key);
         tooltip.Show(image, this, x + panelBack.Location.X, y + panelBack.Location.Y);
     }
 }
Example #9
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            eid            = HItemBook.GetItemId(gameShopConfig.Item);
         image = HItemBook.GetPreview(eid);
         tooltip.Show(image, parent, mx, my, eid);
     }
 }
Example #10
0
 private void OnVRegionEntered(int id, int x, int y, int key)
 {
     if (key > 0)
     {
         Image image = HItemBook.GetPreview(key);
         tooltip.Show(image, this, x, y);
     }
     else
     {
         tooltip.Hide(this);
     }
 }
Example #11
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);
        }
Example #12
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);
             }
         }
     }
     {
         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);
             }
         }
     }
 }
Example #13
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);
     }
 }
Example #14
0
        private void virtualRegion_RegionEntered(int id, int x, int y, int key)
        {
            lastKey = key;

            if (key > 0)
            {
                var region = vRegion.GetRegion(id);
                if (region != null)
                {
                    Image image = HItemBook.GetPreview(key);
                    tooltip.Show(image, parent, x, y);
                }
            }

            if (id == 20)
            {
                tooltip.Show("不提交", parent, x, y);
            }
        }
Example #15
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);
     }
 }
Example #16
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);
        }