예제 #1
0
 /// <summary>
 /// Creates a new cells enumerator for the specified sheet area with the specified search order for the specified search range.
 /// </summary>
 /// <param name="worksheet">The sheet.</param>
 /// <param name="sheetArea">The sheet area.</param>
 /// <param name="searchOrder">The search order for this enumerator.</param>
 /// <param name="rowStart">The starting row to enumerate.</param>
 /// <param name="columnStart">The starting column to enumerate.</param>
 /// <param name="rowEnd">The ending row to enumerate.</param>
 /// <param name="columnEnd">The ending column to enumerate.</param>
 public CellsEnumerator(Worksheet worksheet, Dt.Cells.Data.SheetArea sheetArea, Dt.Cells.Data.SearchOrder searchOrder, int rowStart, int columnStart, int rowEnd, int columnEnd)
 {
     this.sheetArea       = Dt.Cells.Data.SheetArea.Cells;
     this.rowStart        = -1;
     this.rowEnd          = -1;
     this.actualEndRow    = -1;
     this.columnStart     = -1;
     this.columnEnd       = -1;
     this.actualEndColumn = -1;
     this.currentColumn   = -1;
     this.currentRow      = -1;
     this.options         = EnumeratorOption.HasStyle | EnumeratorOption.HasValue;
     if (worksheet == null)
     {
         throw new ArgumentOutOfRangeException("sheet");
     }
     this.options     = EnumeratorOption.HasStyle | EnumeratorOption.HasValue;
     this.worksheet   = worksheet;
     this.sheetArea   = sheetArea;
     this.searchOrder = searchOrder;
     this.rowStart    = rowStart;
     this.columnStart = columnStart;
     this.rowEnd      = rowEnd;
     this.columnEnd   = columnEnd;
     this.Init();
     this.block = this.worksheet.GetStorage(this.sheetArea);
 }
예제 #2
0
        /// <summary>
        /// Checks the index bounds.
        /// </summary>
        /// <param name="row">Row index</param>
        /// <param name="sheetArea">The sheet area</param>
        void CheckRowIndexBounds(int row, Dt.Cells.Data.SheetArea sheetArea)
        {
            int rowCount = this.worksheet.GetRowCount(sheetArea);

            if ((row < -1) || (row >= rowCount))
            {
                throw new IndexOutOfRangeException(string.Format(ResourceStrings.InvaildRowIndexWithAllowedRangeBehind, row, rowCount - 1));
            }
        }
예제 #3
0
        /// <summary>
        /// Checks the index bounds.
        /// </summary>
        /// <param name="column">Column index</param>
        /// <param name="sheetArea">The sheet area</param>
        void CheckColumnIndexBounds(int column, Dt.Cells.Data.SheetArea sheetArea)
        {
            int columnCount = this.worksheet.GetColumnCount(sheetArea);

            if ((column < -1) || (column >= columnCount))
            {
                throw new IndexOutOfRangeException(string.Format(ResourceStrings.InvalidColumnIndexWithAllowedRangeBehind, column, columnCount - 1));
            }
        }
예제 #4
0
 internal CellChangedEventArgs(string propertyName, int row, int column, int rowCount, int columnCount, Dt.Cells.Data.SheetArea sheetArea)
 {
     this.propertyName = propertyName;
     this.row          = row;
     this.column       = column;
     this.rowCount     = rowCount;
     this.columnCount  = columnCount;
     this.sheetArea    = sheetArea;
 }
예제 #5
0
 /// <summary>
 /// Creates a new cells enumerator for the specified sheet area.
 /// </summary>
 /// <param name="worksheet">The sheet.</param>
 /// <param name="sheetArea">The sheet area.</param>
 public CellsEnumerator(Worksheet worksheet, Dt.Cells.Data.SheetArea sheetArea) : this(worksheet, sheetArea, Dt.Cells.Data.SearchOrder.ZOrder)
 {
 }
예제 #6
0
 /// <summary>
 /// Creates a new cells enumerator for the specified sheet area with the specified search order.
 /// </summary>
 /// <param name="worksheet">The sheet.</param>
 /// <param name="sheetArea">The sheet area.</param>
 /// <param name="searchOrder">The search order for this enumerator.</param>
 public CellsEnumerator(Worksheet worksheet, Dt.Cells.Data.SheetArea sheetArea, Dt.Cells.Data.SearchOrder searchOrder) : this(worksheet, sheetArea, searchOrder, -1, -1, -1, -1)
 {
 }
예제 #7
0
 /// <summary>
 /// Creates a collection of cells.
 /// </summary>
 /// <param name="worksheet">The sheet</param>
 /// <param name="sheetArea">A <see cref="P:Dt.Cells.Data.Cells.SheetArea" /> enumeration that specifies the sheet area type.</param>
 internal Cells(Dt.Cells.Data.Worksheet worksheet, Dt.Cells.Data.SheetArea sheetArea)
 {
     this.worksheet = worksheet;
     this.sheetArea = sheetArea;
 }
예제 #8
0
 internal CellChangedEventArgs(string propertyName, int row, int column, Dt.Cells.Data.SheetArea sheetArea) : this(propertyName, row, column, 1, 1, sheetArea)
 {
 }