moonnight 发表于 2018-5-17 18:56:43

winform---询问

俄罗斯方块的数据怎么交互数据库,俄罗斯方块怎么调整画布到自己想要的区域?
谢谢。

ibcadmin 发表于 2018-5-17 18:58:41

........没明白,画布相关的要学学GUI+

moonnight 发表于 2018-5-17 19:06:53

谢谢了

moonnight 发表于 2018-5-17 19:08:41

       public void DrawPoint(Graphics AGraphics, Point APoint, byte ABrick)
      {
            if (ImageList == null) return;
            if (ImageList.Images.Count <= 0) return;
            if (APoint.X < 0 || APoint.X >= colCount) return;
            if (APoint.Y < 0 || APoint.Y >= rowCount) return;

            Rectangle vRectangle = new Rectangle(
                APoint.X * brickWidth, APoint.Y * brickHeight,
                brickWidth, brickHeight);
            AGraphics.FillRectangle(new SolidBrush(BackColor), vRectangle);
            if (ABrick <= 0) return;
            ABrick = (byte)((ABrick - 1) % ImageList.Images.Count);
            Image vImage = ImageList.Images;
            AGraphics.DrawImage(vImage, vRectangle.Location);
      }

moonnight 发表于 2018-5-17 19:09:36

谢谢了,怎么调整画布位置

ibcadmin 发表于 2018-5-18 14:38:44

试着调一下 APoint 这个参数值

moonnight 发表于 2018-5-21 15:46:52

谢谢
页: [1]
查看完整版本: winform---询问