예제 #1
0
        public override void Init(int width, int height)
        {
            base.Init(width, height);

            infoControls = new LevelInfoItem[3];
            for (int i = 0; i < 3; i++)
            {
                infoControls[i] = new LevelInfoItem(this, 8, 35 + i * 80, 400, 80);
                infoControls[i].Init(i);
            }
            infoDatas = LevelInfoBook.GetLevelInfosByLevel(OldLevel, Level);
            RefreshInfo();
        }
예제 #2
0
        public void Draw(Graphics g)
        {
            g.DrawRectangle(Pens.White, x, y, width - 1, height - 1);

            if (show)
            {
                colorWord.Draw(g);

                LevelInfoConfig levelInfoConfig = ConfigData.GetLevelInfoConfig(id);
                g.DrawImage(LevelInfoBook.GetLevelInfoImage(id), x + 10, y + 10, 64, 64);

                Image back = PicLoader.Read("Border", "border3.PNG");
                g.DrawImage(back, x + 10, y + 10, 64, 64);
                back.Dispose();

                Font  font  = new Font("微软雅黑", 10 * 1.33f, FontStyle.Regular, GraphicsUnit.Pixel);
                Brush brush = new SolidBrush(Color.FromName(HSTypes.I2LevelInfoColor(levelInfoConfig.Type)));
                g.DrawString(HSTypes.I2LevelInfoType(levelInfoConfig.Type), font, brush, x + 80, y + 30);
                brush.Dispose();
                font.Dispose();
            }
        }