public void CopyFrom(CloneContext cloneContext, DxfTableCell from) { this.tableCellStateFlags_0 = from.tableCellStateFlags_0; this.string_0 = from.string_0; foreach (DxfTableCustomData dxfTableCustomData in (List <DxfTableCustomData>)from.dxfTableCustomDataCollection_0) { this.dxfTableCustomDataCollection_0.Add(dxfTableCustomData.Clone(cloneContext)); } this.int_0 = from.int_0; this.int_1 = from.int_1; this.dxfTableCellLinkedData_0 = from.dxfTableCellLinkedData_0 != null?from.dxfTableCellLinkedData_0.Clone(cloneContext) : (DxfTableCellLinkedData)null; foreach (DxfTableCellContent tableCellContent in (List <DxfTableCellContent>)from.dxfTableCellContentCollection_0) { this.dxfTableCellContentCollection_0.Add(tableCellContent.Clone(cloneContext)); } this.dxfTableCellStyle_0 = (DxfTableCellStyle)cloneContext.Clone((IGraphCloneable)from.dxfTableCellStyle_0); this.dxfTableCellStyle_1 = cloneContext.SourceModel != cloneContext.TargetModel ? (DxfTableCellStyle)cloneContext.Clone((IGraphCloneable)from.dxfTableCellStyle_1) : from.dxfTableCellStyle_1; this.class550_0 = from.class550_0 != null?from.class550_0.Clone() : (Class550)null; this.int_2 = from.int_2; this.int_3 = from.int_3; this.int_4 = from.int_4; this.double_0 = from.double_0; this.double_1 = from.double_1; if (cloneContext.SourceModel == cloneContext.TargetModel) { this.UnknownObject = from.UnknownObject; } else { this.UnknownObject = (DxfHandledObject)cloneContext.Clone((IGraphCloneable)from.UnknownObject); } }
public Class567 method_1() { this.dxfTableCellStyle_0 = new DxfTableCellStyle(); this.class567_0 = new Class567(this.dxfTableCellStyle_0); this.list_1.Add(this.class567_0); return(this.class567_0); }
public WW.Cad.Model.CellAlignment method_2(DxfTableCellStyle cellStyle) { if (!this.CellAlignment.HasValue) { return(cellStyle.CellAlignment); } return(this.CellAlignment.Value); }
public Color method_1(DxfTableCellStyle cellStyle) { if (!this.nullable_2.HasValue) { return(cellStyle.ContentColor); } return(this.nullable_2.Value); }
public DxfTextStyle method_0(DxfTableCellStyle cellStyle) { if (this.TextStyle != null) { return(this.TextStyle); } return(cellStyle.TextStyle); }
public double GetEffectiveTextHeight(DxfTableCellStyle cellStyle) { if (!this.nullable_0.HasValue) { return(cellStyle.TextHeight); } return(this.nullable_0.Value); }
public void ScaleMe(DxfTableCellStyle cellStyle, double scaleFactor, CommandGroup undoGroup) { if (scaleFactor == 1.0) { return; } this.dxfContentFormat_0.ScaleMe(cellStyle, scaleFactor, undoGroup); }
public void CopyFrom(DxfTableColumn from, CloneContext cloneContext) { this.string_0 = from.string_0; this.int_0 = from.int_0; foreach (DxfTableCustomData dxfTableCustomData in (List <DxfTableCustomData>)from.dxfTableCustomDataCollection_0) { this.dxfTableCustomDataCollection_0.Add(dxfTableCustomData.Clone(cloneContext)); } this.dxfTableCellStyle_0 = (DxfTableCellStyle)cloneContext.Clone((IGraphCloneable)from.dxfTableCellStyle_0); this.dxfTableCellStyle_1 = cloneContext.SourceModel != cloneContext.TargetModel ? (DxfTableCellStyle)cloneContext.Clone((IGraphCloneable)from.dxfTableCellStyle_1) : from.dxfTableCellStyle_1; this.double_0 = from.double_0; }
public DxfTableCellStyle GetCellStyle(int rowIndex, int columnIndex) { DxfTableCellStyle dxfTableCellStyle = (DxfTableCellStyle)null; if (rowIndex == 0) { dxfTableCellStyle = !this.method_4() ? this.TableStyle.TitleCellStyle : (!this.method_5() ? this.TableStyle.HeaderCellStyle : this.TableStyle.DataCellStyle); } else if (rowIndex == 1) { dxfTableCellStyle = !this.method_4() ? (!this.method_5() ? this.TableStyle.HeaderCellStyle : this.TableStyle.DataCellStyle) : this.TableStyle.DataCellStyle; } else if (rowIndex > 1) { dxfTableCellStyle = this.TableStyle.DataCellStyle; } return(dxfTableCellStyle); }
public override void ResolveReferences(Class374 modelBuilder) { base.ResolveReferences(modelBuilder); foreach (Class567 class567 in this.list_1) { class567.ResolveReferences(modelBuilder); } bool flag = false; DxfDictionary extensionDictionary = this.dxfTableStyle_0.ExtensionDictionary; if (extensionDictionary != null && extensionDictionary.Entries.Count > 0) { IDictionaryEntry first = extensionDictionary.Entries.GetFirst("ACAD_ROUNDTRIP_2008_TABLESTYLE_CELLSTYLEMAP"); if (first != null) { DxfCellStyleMap key = first.Value as DxfCellStyleMap; Class264 class264; if (key != null && modelBuilder.CellStyleMapBuilders.TryGetValue(key, out class264)) { class264.ResolveReferences(modelBuilder, this.dxfTableStyle_0); flag = true; } } } if (flag) { return; } if (this.dxfTableStyle_0.DataCellStyle == null && this.list_1.Count > 0) { DxfTableCellStyle cellStyle = this.list_1[0].CellStyle; if (string.IsNullOrEmpty(cellStyle.Name)) { cellStyle.Name = "_DATA"; } this.dxfTableStyle_0.method_8(cellStyle); } if (this.dxfTableStyle_0.TitleCellStyle == null && this.list_1.Count > 1) { DxfTableCellStyle cellStyle = this.list_1[1].CellStyle; if (string.IsNullOrEmpty(cellStyle.Name)) { cellStyle.Name = "_TITLE"; } this.dxfTableStyle_0.method_10(cellStyle); } if (this.dxfTableStyle_0.HeaderCellStyle == null && this.list_1.Count > 2) { DxfTableCellStyle cellStyle = this.list_1[2].CellStyle; if (string.IsNullOrEmpty(cellStyle.Name)) { cellStyle.Name = "_HEADER"; } this.dxfTableStyle_0.method_9(cellStyle); } foreach (Class567 class567 in this.list_1) { if (class567.CellStyle != this.dxfTableStyle_0.TableCellStyle) { DxfTableCellStyle cellStyle = class567.CellStyle; DxfTableCellStyle dxfTableCellStyle; if (this.dxfTableStyle_0.CellStyles.TryGetValue(cellStyle.Name, out dxfTableCellStyle)) { this.dxfTableStyle_0.CellStyles[this.dxfTableStyle_0.CellStyles.IndexOf(dxfTableCellStyle)] = cellStyle; } else { this.dxfTableStyle_0.CellStyles.Add(cellStyle); } } } }
public void method_0(DxfTable table, DxfTableContent tableContent) { this.vector3D_0 = table.HorizontalDirection; int num = tableContent.RowCount; if (table.BreakData != null && table.BreakData.OptionFlags != TableBreakOptionFlags.None && table.BreakData.RowRanges.Count > 0) { num = table.BreakData.RowRanges[0].EndRowIndex + 1; } this.method_7(num, false); this.method_8(tableContent.ColumnCount, false); if (tableContent.TableStyle == null) { throw new ArgumentException("Table style is not set on table content."); } this.TableStyle = tableContent.TableStyle; this.FlowDirection = tableContent.FlowDirection; this.SuppressTitle = tableContent.SuppressTitle == this.TableStyle.SuppressTitle ? new bool?() : new bool?(tableContent.SuppressTitle); this.SuppressHeaderRow = tableContent.SuppressHeaderRow == this.TableStyle.SuppressHeaderRow ? new bool?() : new bool?(tableContent.SuppressHeaderRow); this.VerticalCellMargin = !tableContent.CellStyleOverrides.OverrideVerticalMargin ? new double?() : new double?(tableContent.CellStyleOverrides.VerticalMargin); this.HorizontalCellMargin = !tableContent.CellStyleOverrides.OverrideHorizontalMargin ? new double?() : new double?(tableContent.CellStyleOverrides.HorizontalMargin); for (int rowIndex = 0; rowIndex < this.RowCount; ++rowIndex) { Class430 class430 = this.class429_0[rowIndex]; DxfTableRow row = tableContent.Rows[rowIndex]; class430.Height = row.Height; for (int columnIndex = 0; columnIndex < this.ColumnCount; ++columnIndex) { Class1026 cell1 = class430.Cells[columnIndex]; DxfTableCell cell2 = row.Cells[columnIndex]; TableCellContentType tableCellContentType1 = TableCellContentType.Value; DxfTableCellContent tableCellContent = (DxfTableCellContent)null; DxfTableCellStyle cellStyle = this.GetCellStyle(rowIndex, columnIndex); TableCellContentType tableCellContentType2; if (cell2.Contents.Count > 0) { tableCellContentType1 = TableCellContentType.Value; tableCellContentType1 = TableCellContentType.Value; tableCellContent = cell2.Contents[0]; tableCellContentType2 = tableCellContent.ContentType; switch (tableCellContentType2) { case TableCellContentType.Value: case TableCellContentType.Field: break; case TableCellContentType.Block: cell1.CellType = Enum47.const_2; cell1.Value.method_0(DxfValueFormat.GeneralInstance); cell1.Value.method_1((object)null); cell1.Value.method_2((string)null); cell1.AutoFit = table.GetAutoScale(rowIndex, columnIndex, -1); cell1.BlockScale = table.GetBlockScale(rowIndex, columnIndex, -1); cell1.Rotation = table.GetRotation(rowIndex, columnIndex, -1); if (tableCellContent != null) { cell1.BlockOrField = (DxfHandledObject)(tableCellContent.ValueObject as DxfBlock); cell1.AutoFit = table.GetAutoScale(rowIndex, columnIndex, 0); cell1.BlockScale = table.GetBlockScale(rowIndex, columnIndex, 0); cell1.Rotation = table.GetRotation(rowIndex, columnIndex, 0); goto label_16; } else { goto label_16; } default: goto label_16; } } else { tableCellContentType1 = TableCellContentType.Value; tableCellContentType2 = TableCellContentType.Value; } cell1.CellType = Enum47.const_1; if (tableCellContent != null) { cell1.BlockOrField = tableCellContentType2 != TableCellContentType.Field ? (DxfHandledObject)null : tableCellContent.ValueObject; cell1.Value.CopyFromShallow(tableCellContent.Value); double?rotationOverride = table.GetRotationOverride(rowIndex, columnIndex, 0, cellStyle); cell1.Rotation = rotationOverride.HasValue ? rotationOverride.Value : 0.0; cell1.TextStyle = table.GetTextStyleOverride(rowIndex, columnIndex, 0, cellStyle); cell1.TextHeight = table.GetTextHeightOverride(rowIndex, columnIndex, 0, cellStyle); } else { cell1.BlockOrField = (DxfHandledObject)null; if (cell2.Contents.Count > 0) { cell1.Value.CopyFromShallow(cell2.Contents[0].Value); } double?rotationOverride = table.GetRotationOverride(rowIndex, columnIndex, -1, cellStyle); cell1.Rotation = rotationOverride.HasValue ? rotationOverride.Value : 0.0; cell1.TextStyle = table.GetTextStyleOverride(rowIndex, columnIndex, -1, cellStyle); cell1.TextHeight = table.GetTextHeightOverride(rowIndex, columnIndex, -1, cellStyle); } label_16: cell1.CellAlignment = table.GetCellAlignmentOverride(rowIndex, columnIndex, -1, cellStyle); Color?contentColorOverride = table.GetContentColorOverride(rowIndex, columnIndex, -1, cellStyle); cell1.ContentColor = contentColorOverride.HasValue ? new Color?(contentColorOverride.Value) : new Color?(); Color?backColor = table.GetBackColor(rowIndex, columnIndex); if (backColor.HasValue) { cell1.BackColor = new Color?(backColor.Value); cell1.IsBackColorEnabled = new bool?(true); } else { cell1.BackColor = new Color?(); cell1.IsBackColorEnabled = new bool?(); } for (int borderIndex = 0; borderIndex < 4; ++borderIndex) { DxfTableBorder dxfTableBorder = cell2.CellStyleOverrides.method_21(borderIndex + 2); DxfTableBorderOverrides tableBorderOverrides = cell1.method_6(borderIndex); tableBorderOverrides.Color = !dxfTableBorder.OverrideColor ? new Color?() : new Color?(dxfTableBorder.Color); tableBorderOverrides.LineWeight = !dxfTableBorder.OverrideLineWeight ? new short?() : new short?(dxfTableBorder.LineWeight); tableBorderOverrides.Visible = !dxfTableBorder.OverrideVisibility ? new bool?() : new bool?(dxfTableBorder.Visible); } } } for (int index = 0; index < this.ColumnCount; ++index) { this.class912_0[index].Width = tableContent.Columns[index].Width; } foreach (DxfTableCellRange mergedCellRange in (List <DxfTableCellRange>)tableContent.MergedCellRanges) { if ((mergedCellRange.TopRowIndex != mergedCellRange.BottomRowIndex || mergedCellRange.LeftColumnIndex != mergedCellRange.RightColumnIndex) && (mergedCellRange.TopRowIndex < this.RowCount && mergedCellRange.LeftColumnIndex < this.ColumnCount)) { Class1026 cell = this.class429_0[mergedCellRange.TopRowIndex].Cells[mergedCellRange.LeftColumnIndex]; cell.MergedCellCountHorizontal = mergedCellRange.RightColumnIndex - mergedCellRange.LeftColumnIndex + 1; cell.MergedCellCountVertical = mergedCellRange.BottomRowIndex - mergedCellRange.TopRowIndex + 1; } } }
public Class567(DxfTableCellStyle cellStyle) : base((DxfContentFormat)cellStyle) { }