Exemple #1
0
 public void PerformCellAction(CellAction action)
 {
     foreach (RangeItem item in Items)
     {
         item.PerformCellAction(action);
     }
 }
Exemple #2
0
        public void PerformCellAction(CellAction action)
        {
            bool firstCell = false;
            bool lastCell  = false;

            for (int row = this.Row1; row <= this.Row2; row++)
            {
                for (int col = this.Column1; col <= this.Column2; col++)
                {
                    firstCell = row == this.Row1 && col == this.Column1;
                    lastCell  = row == this.Row2 && col == this.Column2;
                    Cell cell = new Cell(row, col);
                    action.PerformAction(cell, firstCell, lastCell);
                }
            }
        }