Ejemplo n.º 1
0
        private Equip vEquip; //所有装备的属性

        public EquipmentForm()
        {
            InitializeComponent();
            this.bitmapButtonClose.ImageNormal = PicLoader.Read("ButtonBitmap", "CloseButton1.JPG");
            vRegion = new VirtualRegion(this);
            var r1 = new PictureRegion(1, 413, 69, 64, 64, 1, VirtualRegionCellType.Equip, UserProfile.InfoEquip.Equipon[0]);
            r1.AddDecorator(new RegionBorderDecorator(Color.Yellow));//头盔
            vRegion.AddRegion(r1);
            r1 = new PictureRegion(2, 374, 151, 40, 40, 2, VirtualRegionCellType.Equip, UserProfile.InfoEquip.Equipon[1]);
            r1.AddDecorator(new RegionBorderDecorator(Color.Yellow));//武器
            vRegion.AddRegion(r1);
            r1 = new PictureRegion(3, 425, 151, 40, 40, 3, VirtualRegionCellType.Equip, UserProfile.InfoEquip.Equipon[2]);
            r1.AddDecorator(new RegionBorderDecorator(Color.Yellow));//防具
            vRegion.AddRegion(r1);
            r1 = new PictureRegion(4, 476, 151, 40, 40, 4, VirtualRegionCellType.Equip, UserProfile.InfoEquip.Equipon[3]);
            r1.AddDecorator(new RegionBorderDecorator(Color.Yellow));//饰品
            vRegion.AddRegion(r1);

            vRegion.AddRegion(new SubVirtualRegion(10, 147, 107, 46, 44, 10));
            vRegion.AddRegion(new SubVirtualRegion(11, 200, 107, 46, 44, 11));
            vRegion.AddRegion(new SubVirtualRegion(12, 253, 107, 46, 44, 12));
            vRegion.AddRegion(new SubVirtualRegion(13, 306, 107, 46, 44, 13));
            vRegion.AddRegion(new SubVirtualRegion(14, 147, 170, 46, 44, 14));
            vRegion.AddRegion(new SubVirtualRegion(15, 200, 170, 46, 44, 15));
            vRegion.AddRegion(new SubVirtualRegion(16, 253, 170, 46, 44, 16));

            for (int i = 0; i < 60; i++)
            {
                var region = new PictureRegion(20 + i, 38 + (i % 15) * 32, 227 + (i / 15) * 32, 32, 32, 20+i, VirtualRegionCellType.Equip, UserProfile.InfoEquip.Equipoff[i]);
             //   region.AddDecorator(new RegionBorderDecorator(region, Color.Yellow));
                vRegion.AddRegion(region);
            }

            vRegion.RegionClicked += new VirtualRegion.VRegionClickEventHandler(virtualRegion_RegionClicked);
            vRegion.RegionEntered += new VirtualRegion.VRegionEnteredEventHandler(virtualRegion_RegionEntered);
            vRegion.RegionLeft += new VirtualRegion.VRegionLeftEventHandler(virtualRegion_RegionLeft);
            tempImage = new Bitmap(160, 160);
            selectTar = -1;
            myCursor = new HSCursor(this);

            popMenuEquip = new PopMenuEquip();
            popContainer = new PoperContainer(popMenuEquip);
            popMenuEquip.PoperContainer = popContainer;
            popMenuEquip.Form = this;
        }
Ejemplo n.º 2
0
        public ItemForm()
        {
            InitializeComponent();
            this.bitmapButtonClose.ImageNormal = PicLoader.Read("ButtonBitmap", "CloseButton1.JPG");
            this.bitmapButtonSort.ImageNormal = PicLoader.Read("ButtonBitmap", "SortButton.JPG");
            bitmapButtonSort.NoUseDrawNine = true;
            this.nlPageSelector1 = new ControlPlus.NLPageSelector(this, 123, 362, 204);
            nlPageSelector1.PageChange += nlPageSelector1_PageChange;

            tempImage = new Bitmap(324, 324);
            baseid = 0;
            tar = selectTar = -1;
            myCursor = new HSCursor(this);

            popMenuItem = new PopMenuItem();
            popContainer = new PoperContainer(popMenuItem);
            popMenuItem.PoperContainer = popContainer;
            popMenuItem.Form = this;
        }