コード例 #1
0
ファイル: Maze.cs プロジェクト: roycefan/dev
 void DrawBGBorder()
 {
     using (var border = new Pen(Color.Black, MazeSettings.CurrentBorderSize))
     {
         MapRows.ToList().ForEach(a => MzGraphics.DrawLine(border, new PointF(MapRectF.X, a), new PointF(MapRectF.Right, a)));
         MapCols.ToList().ForEach(a => MzGraphics.DrawLine(border, new PointF(a, MapRectF.Y), new PointF(a, MapRectF.Bottom)));
     }
 }
コード例 #2
0
ファイル: Maze.cs プロジェクト: roycefan/dev
 void DrawBGDotted()
 {
     using (var dotted = new Pen(Color.Gray, 1))
     {
         dotted.DashStyle = DashStyle.Dash;
         MapRows.ToList().Aggregate((a, n) =>
         {
             var x = (a + n) / 2;
             MzGraphics.DrawLine(dotted, new PointF(MapRectF.X, x), new PointF(MapRectF.Right, x));
             return(n);
         });
         MapCols.ToList().Aggregate((a, n) =>
         {
             var x = (a + n) / 2;
             MzGraphics.DrawLine(dotted, new PointF(x, MapRectF.Y), new PointF(x, MapRectF.Bottom));
             return(n);
         });
     }
 }