コード例 #1
0
ファイル: MGUpToNumber.cs プロジェクト: narlon/TOMClassic
        public MGUpToNumber()
        {
            type = (int)SystemMenuIds.GameUpToNumber;
            InitializeComponent();

            virtualRegion = new VirtualRegion(this);
            for (int i = 0; i < 4; i++)
            {
                ButtonRegion region = new ButtonRegion(i + 1, 60 + 55 * i, 310, 50, 50, i + 1, "GameUpToNumber1.PNG", "GameUpToNumber1On.PNG");
                region.AddDecorator(new RegionTextDecorator(10, 20, 10));
                virtualRegion.AddRegion(region);
            }
            virtualRegion.SetRegionDecorator(1, 0, "牛肉");
            virtualRegion.SetRegionDecorator(2, 0, "蜂蜜");
            virtualRegion.SetRegionDecorator(3, 0, "黄油");
            virtualRegion.SetRegionDecorator(4, 0, " 水");

            virtualRegion.RegionClicked += new VirtualRegion.VRegionClickEventHandler(virtualRegion_RegionClicked);
        }
コード例 #2
0
ファイル: CardShopViewForm.cs プロジェクト: narlon/TOMClassic
        public CardShopViewForm()
        {
            InitializeComponent();
            this.bitmapButtonClose.ImageNormal = PicLoader.Read("ButtonBitmap", "CloseButton1.JPG");
            this.bitmapButtonRefresh.ImageNormal = PicLoader.Read("ButtonBitmap", "LearnButton.JPG");
            this.nlPageSelector1 = new NLPageSelector(this, 371, 438, 150);
            nlPageSelector1.PageChange += nlPageSelector1_PageChange;

            vRegion = new VirtualRegion(this);
            for (int i = 0; i < 3; i++)
            {
                SubVirtualRegion subRegion = new ButtonRegion(i + 1, 16 + 45 * i, 40, 42, 23, i + 1, "ShopTag.JPG", "ShopTagOn.JPG");
                subRegion.AddDecorator(new RegionTextDecorator(8, 7, 9, Color.White, false));
                vRegion.AddRegion(subRegion);
            }
            vRegion.SetRegionDecorator(1, 0, "怪物");
            vRegion.SetRegionDecorator(2, 0, "武器");
            vRegion.SetRegionDecorator(3, 0, "魔法");
            vRegion.RegionClicked += new VirtualRegion.VRegionClickEventHandler(virtualRegion_RegionClick);
        }
コード例 #3
0
ファイル: MGThreeBody.cs プロジェクト: narlon/TOMClassic
        public MGThreeBody()
        {
            type = (int)SystemMenuIds.GameThreeBody;
            InitializeComponent();

            virtualRegion = new VirtualRegion(this);
            for (int i = 0; i < 5; i++)
            {
                ButtonRegion region = new ButtonRegion(i + 1, 40 + 55 * i, 310, 50, 50, i + 1, string.Format("GameSanTi{0}.PNG", i + 1), string.Format("GameSanTi{0}On.PNG", i + 1));
                region.AddDecorator(new RegionTextDecorator(10, 30, 10));
                virtualRegion.AddRegion(region);
            }
            virtualRegion.SetRegionDecorator(1, 0, "浸泡");
            virtualRegion.SetRegionDecorator(2, 0, "脱水");
            virtualRegion.SetRegionDecorator(3, 0, "医疗");
            virtualRegion.SetRegionDecorator(4, 0, "农耕");
            virtualRegion.SetRegionDecorator(5, 0, "科研");
            
            virtualRegion.RegionClicked += new VirtualRegion.VRegionClickEventHandler(virtualRegion_RegionClicked);
        }
コード例 #4
0
ファイル: GameShopViewForm.cs プロジェクト: narlon/TOMClassic
        public GameShopViewForm()
        {
            InitializeComponent();
            this.bitmapButtonClose.ImageNormal = PicLoader.Read("ButtonBitmap", "CloseButton1.JPG");
            this.nlPageSelector1 = new ControlPlus.NLPageSelector(this, 365, 365, 150);
            nlPageSelector1.PageChange += nlPageSelector1_PageChange;
            productIds = new List<int>();
            virtualRegion = new VirtualRegion(this);
            for (int i = 0; i < 4; i++)
            {
                SubVirtualRegion subRegion = new ButtonRegion(i + 1, 16 + 45 * i, 39, 42, 23, i + 1, "ShopTag.JPG", "ShopTagOn.JPG");
                subRegion.AddDecorator(new RegionTextDecorator(8,7,9,Color.White, false));
                virtualRegion.AddRegion(subRegion);
            }
            virtualRegion.SetRegionDecorator(1, 0, "礼包");
            virtualRegion.SetRegionDecorator(2, 0, "战斗");
            virtualRegion.SetRegionDecorator(3, 0, "道具");
            virtualRegion.SetRegionDecorator(4, 0, "神器");

            virtualRegion.RegionClicked += new VirtualRegion.VRegionClickEventHandler(virtualRegion_RegionClick);
        }