public void TcLXBZ() { int num; int num11; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; Class36.smethod_78("Dim80", 80, 1.0, true); IL_22: num2 = 3; this.point3d_0 = new Point3d[2]; IL_30: num2 = 6; ObjectId[] array = new ObjectId[2]; IL_3A: num2 = 7; ObjectId[] array2 = null; IL_3F: num2 = 8; this.point3d_0[0] = CAD.GetPoint("选择插入点: "); IL_5C: num2 = 9; Point3d point3d; if (!(this.point3d_0[0] == point3d)) { goto IL_7E; } IL_79: goto IL_425; IL_7E: num2 = 12; IL_81: num2 = 13; this.point3d_2 = this.point3d_0[0]; IL_9B: num2 = 15; this.short_0 = 1; IL_A5: num2 = 16; if (this.LineDimJig() != 1) { goto IL_2CB; } IL_B6: num2 = 17; this.short_0 = 2; IL_C0: num2 = 18; this.LineDimJig(); checked { for (;;) { IL_2A4: num2 = 23; short num3 = (short)Information.UBound(this.point3d_0, 1); IL_CF: num2 = 24; Class36.smethod_60(Conversions.ToString((int)num3)); IL_DF: num2 = 25; if (num3 == 0) { IL_E9: num2 = 26; num3 = 1; } IL_EF: num2 = 28; array = new ObjectId[(int)(num3 - 1 + 1)]; IL_FF: num2 = 31; int num4 = 0; int num5 = (int)(num3 - 1); int num6 = num4; for (;;) { int num7 = num6; int num8 = num5; if (num7 > num8) { break; } IL_10D: num2 = 32; array[num6] = CAD.AddLineDim(this.point3d_0[num6], this.point3d_0[num6 + 1], this.point3d_1); IL_14F: num2 = 33; num6++; } IL_162: num2 = 34; if (array2 != null) { IL_16F: num2 = 35; ObjectId[] array3 = array2; int i = 0; while (i < array3.Length) { ObjectId objectId = array3[i]; IL_192: num2 = 36; ObjectId objectId2; if (objectId != objectId2) { IL_19E: num2 = 37; Class36.smethod_64(objectId); } i++; IL_1AE: num2 = 39; } } IL_1B3: num2 = 41; array2 = array; IL_1BA: num2 = 42; int num9 = Information.UBound(this.point3d_0, 1); IL_1CB: num2 = 43; this.point3d_0 = (Point3d[])Utils.CopyArray((Array)this.point3d_0, new Point3d[num9 + 1 + 1]); IL_1F4: num2 = 46; int num10 = (int)Class36.smethod_29(this.point3d_0[num9], ref this.point3d_0[num9 + 1], "选择下一点: "); IL_224: num2 = 47; this.point3d_0[num9 + 1] = Class36.smethod_62(this.point3d_0[num9 + 1], this.point3d_0[0], this.point3d_0[1]); IL_276: num2 = 48; Class36.smethod_47(ref this.point3d_0); IL_285: num2 = 49; if (Information.Err().Number > 0) { break; } IL_297: num2 = 52; if (num10 == 0) { break; } IL_2A1: num2 = 55; } IL_2BB: num2 = 58; Class36.smethod_55(array); IL_2C6: goto IL_425; IL_2CB: num2 = 20; IL_2CE: goto IL_425; IL_2D3: goto IL_41A; IL_2D8: num11 = num2; if (num <= -2) { goto IL_2F3; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); goto IL_3F4; IL_2F3 :; } int num12 = num11 + 1; num11 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num12); IL_3F4 :; } catch when(endfilter(obj is Exception & num != 0 & num11 == 0)) { Exception ex = (Exception)obj2; goto IL_2D8; } IL_41A: throw ProjectData.CreateProjectError(-2146828237); IL_425: if (num11 != 0) { ProjectData.ClearProjectError(); } }
public void 任意多边形填充() { int num; int num10; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; Point3d[] array = new Point3d[2]; IL_12: num2 = 3; Class36.smethod_32(ref array[0], ref array[1], "选择插入点:"); IL_2D: num2 = 4; short num3 = 1; IL_31: num2 = 5; Polyline polyline = new Polyline(); for (;;) { IL_124: num2 = 6; short num4; Polyline polyline2; short num6; checked { num3 += 1; IL_3F: num2 = 7; array = (Point3d[])Utils.CopyArray((Array)array, new Point3d[(int)(num3 + 1)]); IL_5A: num2 = 10; num4 = Class36.smethod_29(array[(int)(num3 - 1)], ref array[(int)num3], "选择下一点: "); IL_7E: num2 = 11; if (num4 == 0) { break; } IL_8B: num2 = 14; IL_8E: num2 = 15; polyline2 = new Polyline(); IL_98: num2 = 16; short num5 = 0; num6 = (short)Information.UBound(array, 1); num4 = num5; } for (;;) { short num7 = num4; short num8 = num6; if (num7 > num8) { break; } IL_AA: num2 = 17; polyline2.AddVertexAt((int)num4, Class36.smethod_38(array[(int)num4]), 0.0, 0.0, 0.0); IL_E3: num2 = 18; num4 += 1; } IL_F7: num2 = 19; polyline2.Closed = true; IL_102: num2 = 20; CAD.AddEnt(polyline2); IL_10D: num2 = 21; Class36.smethod_64(polyline.ObjectId); IL_11D: num2 = 22; polyline = polyline2; } IL_130: num2 = 25; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_13F: num2 = 26; Database database = mdiActiveDocument.Database; IL_14B: num2 = 27; using (Transaction transaction = database.TransactionManager.StartTransaction()) { BlockTable blockTable = (BlockTable)transaction.GetObject(database.BlockTableId, 0); BlockTableRecord blockTableRecord = (BlockTableRecord)transaction.GetObject(blockTable[BlockTableRecord.ModelSpace], 1); ObjectIdCollection objectIdCollection = new ObjectIdCollection(); objectIdCollection.Add(polyline.ObjectId); Hatch hatch = new Hatch(); blockTableRecord.AppendEntity(hatch); transaction.AddNewlyCreatedDBObject(hatch, true); hatch.SetDatabaseDefaults(); hatch.PatternScale = 500.0; hatch.SetHatchPattern(1, "grass"); hatch.Associative = true; hatch.AppendLoop(16, objectIdCollection); hatch.EvaluateHatch(true); transaction.Commit(); } IL_218: num2 = 29; Class36.smethod_64(polyline.ObjectId); IL_228: num2 = 30; if (Information.Err().Number <= 0) { goto IL_24F; } IL_23A: num2 = 31; Interaction.MsgBox(Information.Err().Description, MsgBoxStyle.OkOnly, null); IL_24F: goto IL_331; IL_254: int num9 = num10 + 1; num10 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num9); IL_2E8: goto IL_326; IL_2EA: num10 = num2; if (num <= -2) { goto IL_254; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_303 :; } catch when(endfilter(obj is Exception & num != 0 & num10 == 0)) { Exception ex = (Exception)obj2; goto IL_2EA; } IL_326: throw ProjectData.CreateProjectError(-2146828237); IL_331: if (num10 != 0) { ProjectData.ClearProjectError(); } }
private void Button1_Click(object sender, EventArgs e) { int num2; int num11; object obj; try { IL_01: int num = 1; Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); IL_1D: num = 2; DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); IL_30: ProjectData.ClearProjectError(); num2 = -2; IL_39: num = 4; double scale = CAD.GetScale(); IL_42: num = 5; if (!this.RadioButton1.Checked) { goto IL_433; } IL_54: num = 6; string text = this.TextBox1.Text; IL_63: num = 7; text = Strings.Replace(text, "\r\n", "&", 1, -1, CompareMethod.Binary); IL_7B: num = 8; string[] array = new string[1]; IL_85: num = 9; string s = text; string text2 = "&"; NF.Str2Arr(s, ref array, ref text2); IL_9A: num = 10; ObjectId[] array2; Point3d point3d; short num5; short num6; checked { short num3 = (short)Information.UBound(array, 1); IL_A8: num = 11; array2 = new ObjectId[(int)(num3 + 1 + 1)]; IL_B8: num = 12; point3d..ctor(0.0, 0.0, 0.0); IL_DD: num = 13; array2[0] = Class36.smethod_81(point3d, (int)this.short_0, scale).ObjectId; IL_101: num = 14; short num4 = 0; num5 = num3; num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_118: num = 15; if (Operators.CompareString(array[(int)num6], "0.00", false) == 0 | Operators.CompareString(array[(int)num6], "0.000", false) == 0) { IL_144: num = 16; array[(int)num6] = "%%p0.000"; } IL_151: num = 18; if (num6 >= 1) { IL_15E: num = 19; array[(int)num6] = "(" + array[(int)num6] + ")"; } IL_17A: num = 21; if (this.short_0 == 1) { IL_18B: num = 22; Point3d pointXY = CAD.GetPointXY(point3d, 300.0 * scale, 300.0 * scale); IL_1AF: num = 23; array2[(int)(checked (num6 + 1))] = Class36.smethod_57(array[(int)num6], CAD.GetPointXY(pointXY, 800.0 * scale, (double)(checked (400 * num6 + 100)) * scale), 300.0 * scale, 2, 0, "STANDARD", 0.0); } else { IL_20F: num = 25; if (this.short_0 == 2) { IL_220: num = 26; Point3d pointXY = CAD.GetPointXY(point3d, -300.0 * scale, 300.0 * scale); IL_244: num = 27; array2[(int)(checked (num6 + 1))] = Class36.smethod_57(array[(int)num6], CAD.GetPointXY(pointXY, -800.0 * scale, (double)(checked (400 * num6 + 100)) * scale), 300.0 * scale, 0, 0, "STANDARD", 0.0); } else { IL_2A4: num = 29; if (this.short_0 == 3) { IL_2B5: num = 30; Point3d pointXY = CAD.GetPointXY(point3d, -300.0 * scale, -300.0 * scale); IL_2D9: num = 31; array2[(int)(checked (num6 + 1))] = Class36.smethod_57(array[(int)num6], CAD.GetPointXY(pointXY, -800.0 * scale, (double)(checked (0 - (400 * num6 + 100 + 300))) * scale), 300.0 * scale, 0, 0, "STANDARD", 0.0); } else { IL_341: num = 33; if (this.short_0 == 4) { IL_352: num = 34; Point3d pointXY = CAD.GetPointXY(point3d, 300.0 * scale, -300.0 * scale); IL_376: num = 35; array2[(int)(checked (num6 + 1))] = Class36.smethod_57(array[(int)num6], CAD.GetPointXY(pointXY, 800.0 * scale, (double)(checked (0 - (400 * num6 + 100 + 300))) * scale), 300.0 * scale, 2, 0, "STANDARD", 0.0); } } } } IL_3D9: num = 37; num6 += 1; } IL_3E8: num = 38; JigEntIDs jigEntIDs = new JigEntIDs(); IL_3F2: num = 39; JigEntIDs jigEntIDs2 = jigEntIDs; ObjectId[] entIDs = array2; Point3d basePoint; basePoint..ctor(0.0, 0.0, 0.0); jigEntIDs2.method_0(entIDs, basePoint); IL_423: num = 40; Class36.smethod_55(array2); goto IL_77A; IL_433: num = 42; IL_436: num = 43; string text3 = this.TextBox1.Text; IL_446: num = 44; double num9 = Conversion.Val(text3); IL_452: num = 45; ObjectId[] array3 = new ObjectId[2]; IL_45C: num = 46; Point3d point = CAD.GetPoint("选择插入点: "); IL_46B: num = 47; Point3d point3d2; if (!(point != point3d2)) { goto IL_7B0; } IL_47C: num = 48; bool flag = true; for (;;) { IL_75E: num = 53; bool flag2; Point3d point3d_; if (flag2) { IL_743: num = 54; flag = (Class36.smethod_29(point3d_, ref point, "选择下一点: ") != 0); } else { IL_487: num = 56; if (!flag2) { IL_491: num = 57; point3d_ = point; } } IL_498: num = 59; if (!flag) { break; } IL_4A2: num = 60; array3[0] = Class36.smethod_81(point, (int)this.short_0, scale).ObjectId; IL_4C5: num = 61; num9 += (point.Y - point3d_.Y) / 1000.0; IL_4E6: num = 62; string string_; if (num9 == 0.0) { IL_4F8: num = 63; string_ = "%%p0.000"; } else { IL_503: num = 65; IL_506: num = 66; string_ = string.Format("{0:0.000}", num9); } IL_51B: num = 68; if (this.short_0 == 1) { IL_529: num = 69; Point3d pointXY2 = CAD.GetPointXY(point, 300.0 * scale, 300.0 * scale); IL_54C: num = 70; array3[1] = Class36.smethod_57(string_, CAD.GetPointXY(pointXY2, 800.0 * scale, 100.0 * scale), 300.0 * scale, 2, 0, "STANDARD", 0.0); } else { IL_5A0: num = 72; if (this.short_0 == 2) { IL_5AE: num = 73; Point3d pointXY2 = CAD.GetPointXY(point, -300.0 * scale, 300.0 * scale); IL_5D1: num = 74; array3[1] = Class36.smethod_57(string_, CAD.GetPointXY(pointXY2, -800.0 * scale, 100.0 * scale), 300.0 * scale, 0, 0, "STANDARD", 0.0); } else { IL_625: num = 76; if (this.short_0 == 3) { IL_633: num = 77; Point3d pointXY2 = CAD.GetPointXY(point, -300.0 * scale, -300.0 * scale); IL_656: num = 78; array3[1] = Class36.smethod_57(string_, CAD.GetPointXY(pointXY2, -800.0 * scale, -400.0 * scale), 300.0 * scale, 0, 0, "STANDARD", 0.0); } else { IL_6AA: num = 80; if (this.short_0 == 4) { IL_6B8: num = 81; Point3d pointXY2 = CAD.GetPointXY(point, 300.0 * scale, -300.0 * scale); IL_6DB: num = 82; array3[1] = Class36.smethod_57(string_, CAD.GetPointXY(pointXY2, 800.0 * scale, -400.0 * scale), 300.0 * scale, 2, 0, "STANDARD", 0.0); } } } } IL_72A: num = 84; Class36.smethod_55(array3); IL_734: num = 85; point3d_ = point; IL_73B: num = 86; flag2 = true; } IL_76A: num = 89; IL_76D: num = 90; Information.Err().Clear(); goto IL_77A; IL_7B0: num = 50; IL_7B3: goto IL_99C; IL_77A: num = 94; if (Information.Err().Number <= 0) { goto IL_7A1; } IL_78C: num = 95; Interaction.MsgBox(Information.Err().Description, MsgBoxStyle.OkOnly, null); IL_7A1: num = 97; documentLock.Dispose(); IL_7AB: goto IL_99C; IL_7B8: int num10 = num11 + 1; num11 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num10); IL_950: goto IL_991; IL_952: num11 = num; if (num2 <= -2) { goto IL_7B8; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num2); IL_96D :; } catch when(endfilter(obj is Exception & num2 != 0 & num11 == 0)) { Exception ex = (Exception)obj2; goto IL_952; } IL_991: throw ProjectData.CreateProjectError(-2146828237); IL_99C: if (num11 != 0) { ProjectData.ClearProjectError(); } }