private void method_12(DxfDataColumn column) { if (this.bool_0) { return; } if (this.int_0 > column.Cells.Count) { int num = this.int_0 - column.Cells.Count; for (int index = 0; index < num; ++index) { column.Cells.Add(new DxfDataCell()); } } else { if (this.int_0 >= column.Cells.Count) { return; } int num = column.Cells.Count - this.int_0; int index1 = column.Cells.Count - 1; for (int index2 = 0; index2 < num; ++index2) { column.Cells.RemoveAt(index1); --index1; } } }
public DxfDataColumn Clone(CloneContext context) { DxfDataColumn dxfDataColumn = new DxfDataColumn(); dxfDataColumn.dataCellType_0 = this.dataCellType_0; foreach (DxfDataCell dxfDataCell in this.list_0) { dxfDataColumn.list_0.Add(dxfDataCell.Clone(context)); } dxfDataColumn.string_0 = this.string_0; return(dxfDataColumn); }
private void method_13(DxfReader r, DxfDataTable.Class273 objectBuilder) { r.method_91("AcDbField"); r.method_85(); DxfDataColumn currentColumn = (DxfDataColumn)null; int columnIndex = -1; int rowIndex = -1; while (!r.method_92("AcDbField")) { if (!this.method_14(r, objectBuilder, ref currentColumn, ref columnIndex, ref rowIndex)) { r.method_85(); } } }
private void method_9(int value) { int count = this.Columns.Count; if (value > count) { this.bool_0 = true; int num = value - this.Columns.Count; for (int index1 = 0; index1 < num; ++index1) { DxfDataColumn dxfDataColumn = new DxfDataColumn(); this.Columns.Add(dxfDataColumn); for (int index2 = 0; index2 < this.int_0; ++index2) { dxfDataColumn.Cells.Add(new DxfDataCell()); } } this.bool_0 = false; } else { if (value >= this.Columns.Count) { return; } this.bool_0 = true; int num = this.Columns.Count - value; int index1 = count - 1; for (int index2 = 0; index2 < num; ++index2) { this.Columns.RemoveAt(index1); --index1; } this.bool_0 = false; } }
public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext) { base.CopyFrom(from, cloneContext); this.bool_0 = true; DxfDataTable dxfDataTable = (DxfDataTable)from; this.dxfDataColumnCollection_0.Clear(); foreach (DxfDataColumn dxfDataColumn1 in (ActiveList <DxfDataColumn>)dxfDataTable.dxfDataColumnCollection_0) { DxfDataColumn dxfDataColumn2 = dxfDataColumn1.Clone(cloneContext); this.dxfDataColumnCollection_0.Add(dxfDataColumn2); if (dxfDataColumn2.CellType == DataCellType.HardOwnerId || dxfDataColumn2.CellType == DataCellType.SoftOwnerId) { foreach (DxfDataCell cell in (IEnumerable <DxfDataCell>)dxfDataColumn2.Cells) { (cell.Value as DxfDataCellValue.OwnerIdBase)?.Value.vmethod_2((IDxfHandledObject)this); } } } this.int_0 = dxfDataTable.int_0; this.short_0 = dxfDataTable.short_0; this.string_0 = dxfDataTable.string_0; this.bool_0 = false; }
private bool method_14( DxfReader r, DxfDataTable.Class273 objectBuilder, ref DxfDataColumn currentColumn, ref int columnIndex, ref int rowIndex) { switch (r.CurrentGroup.Code) { case 1: this.Name = (string)r.CurrentGroup.Value; break; case 2: currentColumn.Name = (string)r.CurrentGroup.Value; break; case 3: this.method_15(ref rowIndex); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue) new DxfDataCellValue.String((string)r.CurrentGroup.Value); break; case 10: this.method_15(ref rowIndex); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue) new DxfDataCellValue.Point3D((WW.Math.Point3D)r.CurrentGroup.Value); break; case 11: this.method_15(ref rowIndex); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue) new DxfDataCellValue.Vector3D((WW.Math.Vector3D)((WW.Math.Point3D)r.CurrentGroup.Value)); break; case 40: this.method_15(ref rowIndex); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue) new DxfDataCellValue.Double((double)r.CurrentGroup.Value); break; case 70: this.short_0 = (short)r.CurrentGroup.Value; break; case 71: this.method_15(ref rowIndex); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue) new DxfDataCellValue.Bool((bool)r.CurrentGroup.Value); break; case 90: this.ColumnCount = (int)r.CurrentGroup.Value; break; case 91: this.RowCount = (int)r.CurrentGroup.Value; break; case 92: ++columnIndex; rowIndex = -1; if (columnIndex >= this.ColumnCount) { throw new Exception("Column index " + (object)columnIndex + " too large for column count " + (object)this.ColumnCount + "."); } currentColumn = this.dxfDataColumnCollection_0[columnIndex]; currentColumn.CellType = (DataCellType)r.CurrentGroup.Value; break; case 93: this.method_15(ref rowIndex); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue) new DxfDataCellValue.Int32((int)r.CurrentGroup.Value); break; case 330: this.method_15(ref rowIndex); DxfDataCellValue.ObjectIdBase o1 = (DxfDataCellValue.ObjectIdBase) new DxfDataCellValue.SoftPointerId(); objectBuilder.Add((Interface10) new DxfDataCellValue.ObjectIdBase.Class554(o1, (ulong)r.CurrentGroup.Value)); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue)o1; break; case 331: this.method_15(ref rowIndex); DxfDataCellValue.ObjectIdBase o2 = (DxfDataCellValue.ObjectIdBase) new DxfDataCellValue.ObjectId(); objectBuilder.Add((Interface10) new DxfDataCellValue.ObjectIdBase.Class554(o2, (ulong)r.CurrentGroup.Value)); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue)o2; break; case 340: this.method_15(ref rowIndex); DxfDataCellValue.ObjectIdBase o3 = (DxfDataCellValue.ObjectIdBase) new DxfDataCellValue.HardPointerId(); objectBuilder.Add((Interface10) new DxfDataCellValue.ObjectIdBase.Class554(o3, (ulong)r.CurrentGroup.Value)); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue)o3; break; case 350: this.method_15(ref rowIndex); DxfDataCellValue.OwnerIdBase o4 = (DxfDataCellValue.OwnerIdBase) new DxfDataCellValue.SoftOwnerId(); objectBuilder.Add((Interface10) new DxfDataCellValue.OwnerIdBase.Class555(o4, (ulong)r.CurrentGroup.Value)); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue)o4; break; case 360: this.method_15(ref rowIndex); DxfDataCellValue.OwnerIdBase o5 = (DxfDataCellValue.OwnerIdBase) new DxfDataCellValue.HardOwnerId(); objectBuilder.Add((Interface10) new DxfDataCellValue.OwnerIdBase.Class555(o5, (ulong)r.CurrentGroup.Value)); currentColumn.Cells[rowIndex].Value = (DxfDataCellValue)o5; break; default: return(this.method_6(r, (Class259)objectBuilder)); } r.method_85(); return(true); }
private void method_11(object sender, int index, DxfDataColumn oldItem, DxfDataColumn newItem) { this.method_12(newItem); }
private void method_10(object sender, int index, DxfDataColumn item) { this.method_12(item); }