コード例 #1
0
ファイル: CellsInfoHelper.cs プロジェクト: stdstring/FunTasks
 public static CellsInfo ScanRow(this Grid grid, Int32 row)
 {
     if (grid == null)
     {
         throw new ArgumentNullException(nameof(grid));
     }
     if (row < 1 || row > grid.RowCount)
     {
         throw new ArgumentOutOfRangeException(nameof(row));
     }
     return(ScanCells(grid, GridPointGenerator.GenerateRow(row)));
 }
コード例 #2
0
ファイル: CellsInfoHelper.cs プロジェクト: stdstring/FunTasks
 public static CellsInfo ScanSquare(this Grid grid, GridPoint point)
 {
     if (grid == null)
     {
         throw new ArgumentNullException(nameof(grid));
     }
     if (point.Row > grid.RowCount || point.Column > grid.ColumnCount)
     {
         throw new ArgumentOutOfRangeException(nameof(point));
     }
     return(ScanCells(grid, GridPointGenerator.GenerateSquare(point)));
 }
コード例 #3
0
ファイル: CellsInfoHelper.cs プロジェクト: stdstring/FunTasks
 public static CellsInfo ScanColumn(this Grid grid, Int32 column)
 {
     if (grid == null)
     {
         throw new ArgumentNullException(nameof(grid));
     }
     if (column < 1 || column > grid.ColumnCount)
     {
         throw new ArgumentOutOfRangeException(nameof(column));
     }
     return(ScanCells(grid, GridPointGenerator.GenerateColumn(column)));
 }
コード例 #4
0
 public static NumbersBinary AppendSquare(this NumbersBinary numbers, Grid grid, GridPoint point)
 {
     if (grid == null)
     {
         throw new ArgumentNullException(nameof(grid));
     }
     if (point.Row > grid.RowCount || point.Column > grid.ColumnCount)
     {
         throw new ArgumentOutOfRangeException(nameof(point));
     }
     return(AppendCells(numbers, grid, GridPointGenerator.GenerateSquare(point)));
 }
コード例 #5
0
 public static NumbersBinary AppendColumn(this NumbersBinary numbers, Grid grid, Int32 column)
 {
     if (grid == null)
     {
         throw new ArgumentNullException(nameof(grid));
     }
     if (column < 1 || column > grid.ColumnCount)
     {
         throw new ArgumentOutOfRangeException(nameof(column));
     }
     return(AppendCells(numbers, grid, GridPointGenerator.GenerateColumn(column)));
 }
コード例 #6
0
 public static NumbersBinary AppendRow(this NumbersBinary numbers, Grid grid, Int32 row)
 {
     if (grid == null)
     {
         throw new ArgumentNullException(nameof(grid));
     }
     if (row < 1 || row > grid.RowCount)
     {
         throw new ArgumentOutOfRangeException(nameof(row));
     }
     return(AppendCells(numbers, grid, GridPointGenerator.GenerateRow(row)));
 }