public void SPlineToLine() { int num; int num4; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_16: num2 = 3; Database database = mdiActiveDocument.Database; IL_1F: num2 = 4; using (Transaction transaction = database.TransactionManager.StartTransaction()) { BlockTable blockTable = (BlockTable)transaction.GetObject(database.BlockTableId, 1); SymbolTableEnumerator enumerator = blockTable.GetEnumerator(); while (enumerator.MoveNext()) { ObjectId objectId = enumerator.Current; BlockTableRecord blockTableRecord = (BlockTableRecord)transaction.GetObject(objectId, 1); BlockTableRecordEnumerator enumerator2 = blockTableRecord.GetEnumerator(); while (enumerator2.MoveNext()) { ObjectId objectId2 = enumerator2.Current; Entity entity = (Entity)transaction.GetObject(objectId2, 1); if (entity is Spline) { Spline spline = (Spline)entity; Line e = new Line(spline.StartPoint, spline.EndPoint); CAD.AddEnt(e); spline.Erase(); } } if (enumerator2 != null) { enumerator2.Dispose(); } } if (enumerator != null) { enumerator.Dispose(); } transaction.Commit(); } IL_11B: goto IL_187; IL_11D: int num3 = num4 + 1; num4 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3); IL_141: goto IL_17C; IL_143: num4 = num2; if (num <= -2) { goto IL_11D; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_159 :; } catch when(endfilter(obj is Exception & num != 0 & num4 == 0)) { Exception ex = (Exception)obj2; goto IL_143; } IL_17C: throw ProjectData.CreateProjectError(-2146828237); IL_187: if (num4 != 0) { ProjectData.ClearProjectError(); } }
public void TcTZZX() { int num; int num4; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_16: num2 = 3; Database database = mdiActiveDocument.Database; IL_1F: num2 = 4; using (Transaction transaction = database.TransactionManager.StartTransaction()) { LinetypeTable linetypeTable = (LinetypeTable)transaction.GetObject(database.LinetypeTableId, 0); if (!linetypeTable.Has("Dote")) { database.LoadLineTypeFile("Dote", "acad.lin"); } transaction.Commit(); } IL_7F: num2 = 6; CAD.CreateLayer("Dote", 0, "Dote", 9, false, true); IL_96: num2 = 7; using (Transaction transaction2 = database.TransactionManager.StartTransaction()) { LayerTable layerTable = (LayerTable)transaction2.GetObject(database.LayerTableId, 0); SymbolTableEnumerator enumerator = layerTable.GetEnumerator(); while (enumerator.MoveNext()) { ObjectId objectId = enumerator.Current; LayerTableRecord layerTableRecord = (LayerTableRecord)transaction2.GetObject(objectId, 1); if (Operators.CompareString(layerTableRecord.Name.ToUpper(), "DOTE", false) == 0) { layerTableRecord.Color = Color.FromColorIndex(192, 252); } layerTableRecord.LineWeight = 9; } if (enumerator != null) { enumerator.Dispose(); } transaction2.Commit(); } IL_14F: goto IL_1C7; IL_151: int num3 = num4 + 1; num4 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3); IL_181: goto IL_1BC; IL_183: num4 = num2; if (num <= -2) { goto IL_151; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_199 :; } catch when(endfilter(obj is Exception & num != 0 & num4 == 0)) { Exception ex = (Exception)obj2; goto IL_183; } IL_1BC: throw ProjectData.CreateProjectError(-2146828237); IL_1C7: if (num4 != 0) { ProjectData.ClearProjectError(); } }