protected CellGroupBuilder(CellGroupBuilderType type) { var temp_cells = new TGroup(); Query.Columns cols; this.Type = type; if (type == CellGroupBuilderType.SingleRow) { this.query_cells_singlerow = new Query.CellQuery(); cols = this.query_cells_singlerow.Columns; } else if (type == CellGroupBuilderType.MultiRow) { this.query_sections_multirow = new Query.SectionQuery(); cols = this.query_sections_multirow.Add(temp_cells.CellMetadata.First().Src); } else { throw new Exceptions.InternalAssertionException(); } foreach (var pair in temp_cells.CellMetadata) { cols.Add(pair.Src, pair.Name); } }
private static void check_query(Query.CellQuery query) { if (query.CellColumns.Count < 1) { throw new AutomationException("Query must contain at least 1 Column"); } if (query.SectionColumns.Count != 0) { throw new AutomationException("Query should not contain contain any sections"); } }
protected static T _GetCells <T, RT>( IVisio.Shape shape, Query.CellQuery query, RowToObject <T, RT> row_to_object) { CellGroup.check_query(query); var data_for_shape = query.GetCellData <RT>(shape); var cells = row_to_object(data_for_shape.Cells); return(cells); }
private Query.CellQueryResults <string> __GetCells(Query.CellQuery query, IVisio.Page page, IList <int> shapeids, CellValueType type) { var surface = new SurfaceTarget(page); if (type == CellValueType.Formula) { return(query.GetFormulas(surface, shapeids)); } else { return(query.GetResults <string>(surface, shapeids)); } }
private Query.CellQueryResults <string> __GetCells(Query.CellQuery query, IVisio.Shape shape, CellValueType type) { var surface = new SurfaceTarget(shape); if (type == CellValueType.Formula) { return(query.GetFormulas(surface)); } else { return(query.GetResults <string>(surface)); } }
protected static IList <T> _GetCells <T, RT>( IVisio.Page page, IList <int> shapeids, Query.CellQuery query, RowToObject <T, RT> row_to_object) { CellGroup.check_query(query); var surface = new ShapeSheetSurface(page); var data_for_shapes = query.GetCellData <RT>(surface, shapeids); var list = new List <T>(shapeids.Count); foreach (var data_for_shape in data_for_shapes) { var cells = row_to_object(data_for_shape.Cells); list.Add(cells); } return(list); }
protected ReaderSingleRow() { this.query = new Query.CellQuery(); }
private CellGroupBuilder() { this.query_cells_singlerow = null; this.query_sections_multirow = null; }