public static bool isCellInRange(Kernel.Ui.Office.Cell cell, String range) { List <Point> borne = getCellsCoord(range); int startLine = (int)borne[0].Y; int endLine = startLine; int startCol = (int)borne[0].X; int endCol = startCol; try { endLine = (int)borne[1].Y; endCol = (int)borne[1].X; } catch (Exception) { } if (startLine <= cell.Row && endLine >= cell.Row) { if (startCol <= cell.Column && endCol >= cell.Column) { return(true); } } return(false); }
protected void DisplayActiveColumn() { StructuredReportEditorItem page = (StructuredReportEditorItem)getStructuredReportEditor().getActivePage(); if (page == null) return; Kernel.Ui.Office.Cell activeCell = page.getStructuredReportForm().SpreadSheet.getActiveCell(); String activeCellName = activeCell != null ? activeCell.Name : null; page.getStructuredReportForm().StructuredReportPropertiesPanel.SelecteColumn(activeCell); }
public void SelecteColumn(Kernel.Ui.Office.Cell activeCell) { if (activeCell == null) { return; } int col = activeCell.Column; StructuredReportColumn column = this.StructuredReport.GetColumn(col); ColumnForms.Display(column); }
public void SelecteColumn(Kernel.Ui.Office.Cell activeCell) { if (activeCell == null) { return; } int col = activeCell.Column; if (this.Grid == null) { return; } GrilleColumn column = this.Grid.GetColumn(col); ColumnForms.Display(column); }
/// <summary> /// Verify whether a cell in within a range /// </summary> /// <param name="cell"></param> /// <returns></returns> public bool IsCellInRange(Kernel.Ui.Office.Cell cell) { List <Point> bornes = Kernel.Util.RangeUtil.getCellsCoord(this.name); int startLine = (int)Convert.ToInt64(this.nameRow1); int endLine = (int)Convert.ToInt64(this.nameRow2); int startCol = (int)Convert.ToInt64(Kernel.Util.RangeUtil.GetColumnIndex(this.nameColumn1)); int endCol = (int)Convert.ToInt64(Kernel.Util.RangeUtil.GetColumnIndex(this.nameColumn2)); if (startLine <= cell.Row && endLine >= cell.Row) { if (startCol <= cell.Column && endCol >= cell.Column) { return(true); } } return(false); }
public static Resultat getListCell(int startLine, int endLine, int startCol, int endCol, int pageSize = 500) { List <Kernel.Ui.Office.Cell> liste = new List <Ui.Office.Cell>(0); Resultat rest = new Resultat(); Kernel.Ui.Office.RangeItem rangeCount = new Ui.Office.RangeItem(startLine, endLine, startCol, endCol); int reste = rangeCount.CellCount % pageSize; int pageCount = (rangeCount.CellCount / pageSize) + (reste > 0 ? 1 : 0); int count = 0; int l = 0; int c = 0; for (l = startLine; l <= endLine; l++) { for (c = startCol; c <= endCol; c++) { Kernel.Ui.Office.Cell cell = new Kernel.Ui.Office.Cell(l, c); liste.Add(cell); count++; if (count == pageSize) { startLine = l + 1; startCol = c + 1; rest.liste = liste; rest.row1 = l + 1; rest.row2 = endLine; rest.Col1 = c + 1; rest.Col2 = endCol; return(rest); } } } rest.liste = liste; rest.row1 = l + 1; rest.row2 = endLine; rest.Col1 = c + 1; rest.Col2 = endCol; return(rest); }