Beispiel #1
0
        /// <summary>
        /// 绘制怪物数据到窗口
        /// </summary>
        protected override void ReDraw()
        {
            Canvas = new Bitmap(WindowFace);
            Graphics g = Graphics.FromImage(Canvas);

            g.Clear(Color.Black);

            Font       strFont  = new Font("幼圆", 12, FontStyle.Bold);
            SolidBrush strBrush = new SolidBrush(Color.White);

            g.DrawString("怪物手册", new Font("宋体", 18, FontStyle.Bold), strBrush, new PointF(220, 10));

            OneFlash(null, null);

            //逐一绘制怪物属性
            int trun = 0;
            IEnumerable <ICanShowData> curMonsters = CurMonsters;

            foreach (var item in curMonsters)
            {
                DrawMonsterData(g, trun, item);

                trun++;
            }

            //绘制说明信息
            g.DrawString("按space返回主游戏页面", strFont, strBrush, new PointF(190, 420));

            g.DrawString(curPage.ToString() + " / " + MaxPage.ToString(), strFont, strBrush, new PointF(460, 420));
            try
            {
                //如果当前页数大于1,绘制向左翻页的提示
                if (CurPage > 1)
                {
                    g.DrawImage(new Bitmap("images/left.png"), new Point(440, 418));
                }
                //如果当前页数小于最大页数,绘制向右翻页提示
                if (curPage < MaxPage)
                {
                    g.DrawImage(new Bitmap("images/right.png"), new Point(508, 418));
                }
            }
            catch
            {
            }

            Canvas.SetOpacity(0.90F);
            WindowFace = Canvas;
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     q = Request.QueryString["q"];
     if (!IsPostBack)
     {
         ViewAllInfo(); rdbtnlstDataSourceBrands(); drpdwnlst_View.SelectedValue = Request.QueryString["rpp"];
         MinPage = rows * NumPage; MaxPage = rows + MinPage; MinPage = MinPage + 1; lbl_MaxPage.Text = MaxPage.ToString(); lbl_MinPage.Text = MinPage.ToString();
     }
 }