private void DataGridView3_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); this.Hide(); double h = Conversions.ToDouble(this.DataGridView3.Rows[e.RowIndex].Cells[1].Value); double b = Conversions.ToDouble(this.DataGridView3.Rows[e.RowIndex].Cells[2].Value); double d = Conversions.ToDouble(this.DataGridView3.Rows[e.RowIndex].Cells[3].Value); double t = Conversions.ToDouble(this.DataGridView3.Rows[e.RowIndex].Cells[4].Value); double r = Conversions.ToDouble(this.DataGridView3.Rows[e.RowIndex].Cells[5].Value); JigEntIDs jigEntIDs = new JigEntIDs(); ObjectId[] array = new ObjectId[] { this.GZG(b, h, d, t, r).ObjectId }; JigEntIDs jigEntIDs2 = jigEntIDs; ObjectId[] entIDs = array; Point3d basePoint; basePoint..ctor(0.0, 0.0, 0.0); jigEntIDs2.method_0(entIDs, basePoint); documentLock.Dispose(); this.Show(); }
private void RadioButton2_Click(object sender, EventArgs e) { TypedValue[] array = new TypedValue[1]; Array array2 = array; TypedValue typedValue; typedValue..ctor(0, "TEXT"); array2.SetValue(typedValue, 0); SelectionFilter selectionFilter = new SelectionFilter(array); this.RadioButton2.Checked = true; this.Hide(); Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); PromptSelectionResult selection = this.document_0.Editor.GetSelection(selectionFilter); if (selection.Status == 5100) { this.selectionSet_0 = selection.Value; this.long_0 = (long)this.selectionSet_0.Count; if (this.long_0 == 0L) { Class36.smethod_60("没有选择任何文字对象\r\n"); } else { Class36.smethod_60("当前选择集体" + this.long_0.ToString() + "个文字对象\r\n"); } this.Show(); } this.Button1.Enabled = true; this.Button2.Enabled = true; this.Button3.Enabled = true; this.Label3.Text = ""; }
public void Cmd(string Cmd) { Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); Document document = Application.DocumentManager.GetDocument(HostApplicationServices.WorkingDatabase); document.Editor.WriteMessage("\r\n命令:" + Cmd + "\r\n"); document.SendStringToExecute(Cmd + " ", false, false, false); }
private void HScrollBar_0_Scroll(object sender, ScrollEventArgs e) { Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; string str = this.HScrollBar_0.Value.ToString(); mdiActiveDocument.SendStringToExecute("cmdtm " + str + " ", true, false, true); }
private void Button3_Click(object sender, EventArgs e) { string text = "TcQuTongShanChu"; Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); Document document = Application.DocumentManager.GetDocument(HostApplicationServices.WorkingDatabase); document.Editor.WriteMessage("\r\n命令:" + text + "\r\n"); document.SendStringToExecute(text + " ", false, false, false); }
private void Button5_Click(object sender, EventArgs e) { this.Hide(); Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); string text; string text2; double double_; short num4; short num5; checked { short num = (short)Math.Round(Conversion.Val(this.TextBox_9.Text)); text = this.TextBox_8.Text; text2 = this.TextBox_6.Text; double_ = Conversion.Val(this.TextBox_10.Text); short num2 = (short)Math.Round(Conversion.Val(this.TextBox_7.Text)); if (Operators.CompareString(text2, "/N", false) == 0) { text2 = "/" + string.Format("{0:00}", num); } short num3 = num2; num4 = num; num5 = num3; } for (;;) { short num6 = num5; short num7 = num4; if (num6 > num7) { break; } Point3d point = CAD.GetPoint("选择插入点: "); Point3d point3d; if (point == point3d) { goto IL_126; } Class36.smethod_57(text + string.Format("{0:00}", num5) + text2, point, double_, 0, 0, "STANDARD", 0.0); num5 += 1; } documentLock.Dispose(); this.Close(); return; IL_126: documentLock.Dispose(); }
private void Button2_Click(object sender, EventArgs e) { Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; mdiActiveDocument.SendStringToExecute("\u0003\u0003", false, false, false); Database database = mdiActiveDocument.Database; using (Transaction transaction = database.TransactionManager.StartTransaction()) { DBText dbtext = (DBText)transaction.GetObject(this.selectionSet_0[checked ((int)this.long_1)].ObjectId, 1); dbtext.TextString = dbtext.TextString.Replace(this.TextBox1.Text, this.TextBox2.Text); transaction.Commit(); } database.Regenmode = true; documentLock.Dispose(); }
private void Button2_Click(object sender, EventArgs e) { this.Hide(); Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); checked { long num = (long)Math.Round(Conversion.Val(this.TextBox3.Text)); long num2 = (long)Math.Round(Conversion.Val(this.TextBox4.Text)); long num3 = (long)Math.Round(Conversion.Val(this.TextBox5.Text)); string text = this.TextBox7.Text; string text2 = this.TextBox8.Text; double double_ = Conversion.Val(this.TextBox6.Text); double num4 = Conversion.Val(this.TextBox1.Text); double num5 = Conversion.Val(this.TextBox2.Text); long num6 = num; long num7 = num2; long num8 = num3; long num9 = num7; long num10 = num6; for (;;) { long num11 = num8 >> 63 ^ num10; long num12 = num8 >> 63 ^ num9; if (num11 > num12) { break; } Class36.smethod_57(text + Conversions.ToString(num10) + text2, this.point3d_0, double_, 0, 0, "STANDARD", 0.0); unchecked { this.point3d_0..ctor(this.point3d_0.X + num4, this.point3d_0.Y + num5, 0.0); } num10 += num8; } documentLock.Dispose(); this.Close(); } }
private void Button3_Click(object sender, EventArgs e) { this.Hide(); Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); double num = Conversion.Val(this.TextBox_4.Text); double num2 = Conversion.Val(this.TextBox_3.Text); double num3 = Conversion.Val(this.TextBox_2.Text); string text = this.TextBox_0.Text; string text2 = this.TextBox9.Text; double double_ = Conversion.Val(this.TextBox_1.Text); double r = Conversion.Val(this.TextBox_5.Text); checked { long num4 = (long)Math.Round(Math.Abs(unchecked (num2 - num)) / num3); Interaction.MsgBox(num4, MsgBoxStyle.OkOnly, null); this.point3d_0 = CAD.GetPointAngle(this.point3d_0, r, 0.0); long num5 = 0L; long num6 = num4; long num7 = num5; for (;;) { long num8 = num7; long num9 = num6; if (num8 > num9) { break; } Class36.smethod_57(text + Conversion.Str(unchecked (num + (double)num7 * num3)) + text2, this.point3d_0, double_, 0, 0, "STANDARD", 0.0); this.point3d_0 = CAD.GetPointAngle(this.point3d_0, r, (double)num4); num7 += 1L; } documentLock.Dispose(); this.Close(); } }
private void Button3_Click(object sender, EventArgs e) { Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; mdiActiveDocument.SendStringToExecute("\u0003\u0003", false, false, false); Database database = mdiActiveDocument.Database; long value = 0L; this.ListBox1.Items.Clear(); if (this.CheckBox1.Checked) { using (Transaction transaction = database.TransactionManager.StartTransaction()) { BlockTable blockTable = (BlockTable)transaction.GetObject(database.BlockTableId, 1); BlockTableRecord blockTableRecord = (BlockTableRecord)transaction.GetObject(blockTable[BlockTableRecord.ModelSpace], 1); try { foreach (ObjectId objectId in blockTable) { BlockTableRecord blockTableRecord2 = (BlockTableRecord)transaction.GetObject(objectId, 1); try { foreach (ObjectId objectId2 in blockTableRecord2) { if (Operators.CompareString(Class36.amIrsvPmtO(objectId2), "DBText", false) == 0) { DBText dbtext = (DBText)transaction.GetObject(objectId2, 1); string textString = dbtext.TextString; string text = textString.Replace(this.TextBox1.Text, this.TextBox2.Text); if (Operators.CompareString(textString, text, false) != 0) { dbtext.TextString = text; Interlocked.Increment(ref value); this.ListBox1.Items.Add(string.Concat(new string[] { Conversions.ToString(value), " ", textString, " ", text })); } } } } finally { BlockTableRecordEnumerator enumerator2; if (enumerator2 != null) { enumerator2.Dispose(); } } } } finally { SymbolTableEnumerator enumerator; if (enumerator != null) { enumerator.Dispose(); } } transaction.Commit(); goto IL_339; } } checked { using (Transaction transaction2 = database.TransactionManager.StartTransaction()) { long num = 0L; long num2 = this.long_0 - 1L; this.long_1 = num; for (;;) { long num3 = this.long_1; long num4 = num2; if (num3 > num4) { break; } DBText dbtext2 = (DBText)transaction2.GetObject(this.selectionSet_0[(int)this.long_1].ObjectId, 1); string textString2 = dbtext2.TextString; string text2 = textString2.Replace(this.TextBox1.Text, this.TextBox2.Text); if (Operators.CompareString(textString2, text2, false) != 0) { dbtext2.TextString = text2; Interlocked.Increment(ref value); this.ListBox1.Items.Add(string.Concat(new string[] { Conversions.ToString(value), " ", textString2, " ", text2 })); } this.long_1 += 1L; } transaction2.Commit(); } IL_339: database.Regenmode = true; documentLock.Dispose(); this.Label3.Text = Conversions.ToString(value) + "个替换完毕"; this.Button3.Enabled = false; this.Button2.Enabled = false; } }
private void Button2_Click(object sender, EventArgs e) { int num; int num4; object obj2; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); IL_25: num2 = 3; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_32: num2 = 4; Database database = mdiActiveDocument.Database; IL_3B: num2 = 5; DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); IL_4E: num2 = 6; this.arrayList_0 = new ArrayList(); IL_5B: num2 = 7; using (Transaction transaction = database.TransactionManager.StartTransaction()) { TypedValue[] array = new TypedValue[1]; Array array2 = array; TypedValue typedValue; typedValue..ctor(0, "TEXT"); array2.SetValue(typedValue, 0); SelectionFilter selectionFilter = new SelectionFilter(array); PromptSelectionResult selection = mdiActiveDocument.Editor.GetSelection(selectionFilter); if (selection.Status == 5100) { SelectionSet value = selection.Value; IEnumerator enumerator = value.GetEnumerator(); while (enumerator.MoveNext()) { object obj = enumerator.Current; SelectedObject selectedObject = (SelectedObject)obj; DBText dbtext = (DBText)transaction.GetObject(selectedObject.ObjectId, 1); string text = JG.HRB(dbtext.TextString); if ((!this.arrayList_0.Contains(text) & text.Contains("@")) && TcBJFJ_frm.GetBJAS(text) > this.long_0) { this.arrayList_0.Add(text); } } if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } transaction.Commit(); } IL_17C: num2 = 9; this.TextBox1.Text = ""; IL_18F: num2 = 10; this.TextBox4.Text = ""; IL_1A2: num2 = 11; this.arrayList_1 = new ArrayList(); IL_1B0: num2 = 12; IEnumerator enumerator2 = this.arrayList_0.GetEnumerator(); while (enumerator2.MoveNext()) { object value2 = enumerator2.Current; string text2 = Conversions.ToString(value2); IL_1D3: num2 = 13; long bjas = TcBJFJ_frm.GetBJAS(text2); IL_1DF: num2 = 14; this.arrayList_1.Add(bjas); IL_1F5: num2 = 15; this.TextBox4.Text = this.TextBox4.Text + Conversions.ToString(bjas) + "\r\n"; IL_21F: num2 = 16; this.TextBox1.Text = this.TextBox1.Text + text2 + "\r\n"; IL_244: num2 = 17; } if (enumerator2 is IDisposable) { (enumerator2 as IDisposable).Dispose(); } IL_26E: num2 = 18; this.XGJ_sub(); IL_277: num2 = 19; if (Information.Err().Number <= 0) { goto IL_28E; } IL_289: goto IL_3A3; IL_28E: num2 = 22; IL_291: num2 = 23; this.Button1.Enabled = true; IL_2A0: num2 = 25; documentLock.Dispose(); IL_2AA: num2 = 26; if (Information.Err().Number <= 0) { goto IL_2D1; } IL_2BC: num2 = 27; Interaction.MsgBox(Information.Err().Description, MsgBoxStyle.OkOnly, null); IL_2D1: goto IL_3A3; IL_2D6: int num3 = num4 + 1; num4 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3); IL_35A: goto IL_398; IL_35C: num4 = num2; if (num <= -2) { goto IL_2D6; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_375 :; } catch when(endfilter(obj2 is Exception & num != 0 & num4 == 0)) { Exception ex = (Exception)obj3; goto IL_35C; } IL_398: throw ProjectData.CreateProjectError(-2146828237); IL_3A3: if (num4 != 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(); } }
public void TcQZGJ_Layer() { int num; int num4; object obj2; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); IL_25: num2 = 3; DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); IL_37: num2 = 4; CAD.CreateLayer("墙柱小箍筋", 14, "continuous", -3, false, true); IL_4F: num2 = 5; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_5C: num2 = 6; Database database = mdiActiveDocument.Database; IL_66: num2 = 7; TypedValue[] array = new TypedValue[1]; IL_70: num2 = 8; Array array2 = array; TypedValue typedValue; typedValue..ctor(0, "LWPOLYLINE"); array2.SetValue(typedValue, 0); IL_8E: num2 = 9; SelectionFilter selectionFilter = new SelectionFilter(array); IL_9A: num2 = 10; PromptSelectionResult selection = mdiActiveDocument.Editor.GetSelection(selectionFilter); IL_AC: num2 = 11; using (Transaction transaction = database.TransactionManager.StartTransaction()) { SelectionSet value = selection.Value; IEnumerator enumerator = value.GetEnumerator(); while (enumerator.MoveNext()) { object obj = enumerator.Current; SelectedObject selectedObject = (SelectedObject)obj; CAD.ChangeLayer(selectedObject.ObjectId, "墙柱小箍筋"); } if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } transaction.Commit(); } IL_130: num2 = 13; documentLock.Dispose(); IL_139: goto IL_1CC; IL_13E: int num3 = num4 + 1; num4 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3); IL_186: goto IL_1C1; IL_188: num4 = num2; if (num <= -2) { goto IL_13E; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_19E :; } catch when(endfilter(obj2 is Exception & num != 0 & num4 == 0)) { Exception ex = (Exception)obj3; goto IL_188; } IL_1C1: throw ProjectData.CreateProjectError(-2146828237); IL_1CC: if (num4 != 0) { ProjectData.ClearProjectError(); } }
public void DrawCengGaoBiao() { Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); Point3d point3d = CAD.GetPoint("选择插入点: "); checked { Point3d point3d2; if (!(point3d == point3d2)) { Class36.smethod_23(CAD.GetPointXY(point3d, 500.0, 150.0), "层号", 350.0, 0, ""); Class36.smethod_23(CAD.GetPointXY(point3d, 1800.0, 150.0), "层高(m)", 350.0, 0, ""); Class36.smethod_23(CAD.GetPointXY(point3d, 3300.0, 150.0), "标高(m)", 350.0, 0, ""); if (this.CheckBox1.Checked) { Class36.smethod_23(CAD.GetPointXY(point3d, 4800.0, 150.0), "墙柱砼", 350.0, 0, ""); } if (this.CheckBox1.Checked) { Class36.smethod_23(CAD.GetPointXY(point3d, 6300.0, 150.0), "梁板砼", 350.0, 0, ""); } short num = (short)this.DataGridView1.Rows.Count; CAD.AddLine(CAD.GetPointXY(point3d, 1500.0, 0.0), CAD.GetPointXY(point3d, 1500.0, (double)((num + 1) * 600)), "0"); CAD.AddLine(CAD.GetPointXY(point3d, 3000.0, 0.0), CAD.GetPointXY(point3d, 3000.0, (double)((num + 1) * 600)), "0"); if (this.CheckBox1.Checked) { CAD.AddLine(CAD.GetPointXY(point3d, 4500.0, 0.0), CAD.GetPointXY(point3d, 4500.0, (double)((num + 1) * 600)), "0"); } if (this.CheckBox1.Checked) { CAD.AddLine(CAD.GetPointXY(point3d, 6000.0, 0.0), CAD.GetPointXY(point3d, 6000.0, (double)((num + 1) * 600)), "0"); } long num2 = 5000L; if (this.CheckBox1.Checked) { num2 = 7500L; } CAD.AddLine(CAD.GetPointXY(point3d, 0.0, (double)(num * 600)), CAD.GetPointXY(point3d, (double)num2, (double)(num * 600)), "0"); CAD.AddLine(CAD.GetPointXY(point3d, 0.0, (double)((num - 1) * 600)), CAD.GetPointXY(point3d, (double)num2, (double)((num - 1) * 600)), "0"); num -= 2; string[] array = new string[(int)(num + 1)]; string[] array2 = new string[(int)(num + 1)]; string[] array3 = new string[(int)(num + 1 + 1)]; string[] array4 = new string[(int)(num + 1)]; string[] array5 = new string[(int)(num + 1 + 1)]; array5[0] = "-"; short num3 = 0; short num4 = num; short num5 = num3; for (;;) { short num6 = num5; short num7 = num4; if (num6 > num7) { break; } CAD.AddLine(CAD.GetPointXY(point3d, 0.0, (double)(num5 * 600)), CAD.GetPointXY(point3d, (double)num2, (double)(num5 * 600)), "0"); array[(int)num5] = Conversions.ToString(this.DataGridView1.Rows[(int)num5].Cells[0].Value); double num8 = Conversions.ToDouble(Operators.DivideObject(this.DataGridView1.Rows[(int)num5].Cells[1].Value, 1000)); array2[(int)num5] = Strings.Format(num8, "0.000"); if (Operators.ConditionalCompareObjectEqual(this.DataGridView1.Rows[(int)num5].Cells[2].Value, "0.000", false)) { array3[(int)num5] = Conversions.ToString(this.DataGridView1.Rows[(int)num5].Cells[2].Value); } else { array3[(int)num5] = Conversions.ToString(this.DataGridView1.Rows[(int)num5].Cells[2].Value); } if (this.CheckBox1.Checked) { array4[(int)num5] = Conversions.ToString(this.DataGridView1.Rows[(int)num5].Cells[3].Value); if (!array4[(int)num5].ToUpper().Contains("C")) { array4[(int)num5] = "C" + array4[(int)num5].ToUpper(); } else { array4[(int)num5] = array4[(int)num5].ToUpper(); } } if (this.CheckBox1.Checked) { array5[(int)(num5 + 1)] = Conversions.ToString(this.DataGridView1.Rows[(int)num5].Cells[4].Value); if (!array5[(int)(num5 + 1)].ToUpper().Contains("C")) { array5[(int)(num5 + 1)] = "C" + array5[(int)(num5 + 1)].ToUpper(); } else { array5[(int)(num5 + 1)] = array5[(int)(num5 + 1)].ToUpper(); } } unchecked { num5 += 1; } } double num9 = Conversions.ToDouble(Operators.AddObject(this.DataGridView1.Rows[(int)num].Cells[2].Value, Operators.DivideObject(this.DataGridView1.Rows[(int)num].Cells[1].Value, 1000))); array3[(int)(num + 1)] = Strings.Format(num9, "0.000"); Class36.smethod_21(CAD.GetPointXY(point3d, 1000.0, 150.0), array, 300.0, -2.0); Class36.smethod_20(CAD.GetPointXY(point3d, 1800.0, 150.0), array2, 300.0, -2.0, ""); Class36.smethod_21(CAD.GetPointXY(point3d, 4200.0, 150.0), array3, 300.0, -2.0); if (this.CheckBox1.Checked) { Class36.smethod_20(CAD.GetPointXY(point3d, 4800.0, 150.0), array4, 300.0, -2.0, ""); } if (this.CheckBox1.Checked) { Class36.smethod_20(CAD.GetPointXY(point3d, 6300.0, 150.0), array5, 300.0, -2.0, ""); } if (this.CheckBox1.Checked) { num2 = 3750L; } else { num2 = 2500L; } point3d = CAD.GetPointXY(point3d, (double)num2, -1500.0); Class36.smethod_24(point3d, "结构层高表", 500.0, 0, ""); point3d = CAD.GetPointXY(point3d, 0.0, -750.0); Class36.smethod_24(point3d, "注:标高均为楼面结构标高", 350.0, 0, ""); Point3d[] array6 = new Point3d[] { CAD.GetPointXY(point3d, -1500.0, 600.0), CAD.GetPointXY(point3d, 1500.0, 600.0) }; CAD.AddPline(array6, 75.0, false, ""); CAD.AddLine(CAD.GetPointAngle(array6[0], 125.0, -90.0), CAD.GetPointAngle(array6[1], 125.0, -90.0), "0"); documentLock.Dispose(); } } }
private void Button1_Click(object sender, EventArgs e) { int num; int num4; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; string text = this.TreeView1.SelectedNode.Text; IL_1C: num2 = 3; if (Strings.InStr(text, "@", CompareMethod.Binary) == 0) { goto IL_86; } IL_32: num2 = 4; Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); IL_4E: num2 = 5; text = text.Substring(Strings.InStr(text, "@", CompareMethod.Binary)) + "\n"; IL_6D: num2 = 6; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_7A: num2 = 7; mdiActiveDocument.SendStringToExecute(text, true, false, true); IL_86: goto IL_102; IL_88: int num3 = num4 + 1; num4 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3); IL_BC: goto IL_F7; IL_BE: num4 = num2; if (num <= -2) { goto IL_88; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_D4 :; } catch when(endfilter(obj is Exception & num != 0 & num4 == 0)) { Exception ex = (Exception)obj2; goto IL_BE; } IL_F7: throw ProjectData.CreateProjectError(-2146828237); IL_102: if (num4 != 0) { ProjectData.ClearProjectError(); } }
private void Button1_Click(object sender, EventArgs e) { int num; int num6; object obj4; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); IL_25: num2 = 3; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_32: num2 = 4; Database database = mdiActiveDocument.Database; IL_3B: num2 = 5; DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); IL_4E: num2 = 6; this.objectIdCollection_0 = new ObjectIdCollection(); IL_5B: num2 = 7; using (Transaction transaction = database.TransactionManager.StartTransaction()) { TypedValue[] array = new TypedValue[1]; Array array2 = array; TypedValue typedValue; typedValue..ctor(0, "TEXT"); array2.SetValue(typedValue, 0); SelectionFilter selectionFilter = new SelectionFilter(array); PromptSelectionResult selection = mdiActiveDocument.Editor.GetSelection(selectionFilter); if (selection.Status == 5100) { SelectionSet value = selection.Value; IEnumerator enumerator = value.GetEnumerator(); while (enumerator.MoveNext()) { object obj = enumerator.Current; SelectedObject selectedObject = (SelectedObject)obj; DBText dbtext = (DBText)transaction.GetObject(selectedObject.ObjectId, 1); string text = JG.HRB(dbtext.TextString); if (text.Contains("@")) { if (this.RadioButton2.Checked) { if (TcBJFJ_frm.GetBJAS(text) <= this.long_0) { DBObjectCollection dbobjectCollection = new DBObjectCollection(); double num3 = dbtext.Rotation; if (num3 > 6.2831853071795862) { num3 -= 6.2831853071795862; } TcBJFJ_frm.GetFuJinDBText(dbtext, dbtext.Height * 3.0, "楼板负筋标注", num3, ref dbobjectCollection); IEnumerator enumerator2 = dbobjectCollection.GetEnumerator(); while (enumerator2.MoveNext()) { object obj2 = enumerator2.Current; DBText dbtext2 = (DBText)obj2; Class36.smethod_64(dbtext2.ObjectId); } if (enumerator2 is IDisposable) { (enumerator2 as IDisposable).Dispose(); } dbobjectCollection = new DBObjectCollection(); TcBJFJ_frm.GetFuJinPL(dbtext, dbtext.Height * 2.0, "楼板负筋钢筋", num3, ref dbobjectCollection); IEnumerator enumerator3 = dbobjectCollection.GetEnumerator(); while (enumerator3.MoveNext()) { object obj3 = enumerator3.Current; Polyline polyline = (Polyline)obj3; Class36.smethod_64(polyline.ObjectId); } if (enumerator3 is IDisposable) { (enumerator3 as IDisposable).Dispose(); } dbtext.Erase(); } else { this.objectIdCollection_0.Add(dbtext.ObjectId); dbtext.TextString = dbtext.TextString.Replace("@", "@#"); } } else if (TcBJFJ_frm.GetBJAS(text) <= this.long_0) { Class36.smethod_64(dbtext.ObjectId); } else { this.objectIdCollection_0.Add(dbtext.ObjectId); dbtext.TextString = dbtext.TextString.Replace("@", "@#"); } } } if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } transaction.Commit(); } IL_319: num2 = 9; string[] array3 = this.TextBox1.Text.Split(new char[] { '\r' }); IL_33E: num2 = 10; string[] array4 = this.TextBox2.Text.Split(new char[] { '\r' }); IL_363: num2 = 11; string[] array5 = array3; int i = 0; checked { while (i < array5.Length) { string text2 = array5[i]; IL_379: num2 = 12; Application.DoEvents(); IL_381: num2 = 13; if (Operators.CompareString(text2.Trim(), "", false) != 0) { IL_3A1: num2 = 14; int num4 = Array.IndexOf <string>(array3, text2); IL_3AF: num2 = 15; text2 = text2.Trim(); IL_3BB: num2 = 16; text2 = text2.Replace("\r\n", ""); IL_3D1: num2 = 17; text2 = text2.Replace("@", "@#"); IL_3E7: num2 = 18; array4[num4] = array4[num4].Trim(); IL_3F9: num2 = 19; array4[num4] = array4[num4].Replace("\r\n", ""); IL_415: num2 = 20; array4[num4] = array4[num4].Replace("11@", "10/12@"); IL_431: num2 = 21; array4[num4] = array4[num4].Replace("13@", "12/14@"); IL_44D: num2 = 22; array4[num4] = array4[num4].Replace("15@", "14/16@"); IL_469: num2 = 23; array4[num4] = array4[num4].Replace("17@", "16/18@"); IL_485: num2 = 24; array4[num4] = array4[num4].Replace("19@", "18/20@"); IL_4A1: num2 = 25; array4[num4] = array4[num4].Replace("21@", "20/22@"); IL_4BD: num2 = 26; this.ChangeTxt(text2, array4[num4], 6L); } IL_4D7: i++; IL_4DD: num2 = 28; } IL_4ED: num2 = 29; documentLock.Dispose(); IL_4F7: num2 = 30; if (Information.Err().Number <= 0) { goto IL_51E; } IL_509: num2 = 31; Interaction.MsgBox(Information.Err().Description, MsgBoxStyle.OkOnly, null); IL_51E: goto IL_600; IL_523 :; } int num5 = num6 + 1; num6 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num5); IL_5B7: goto IL_5F5; IL_5B9: num6 = num2; if (num <= -2) { goto IL_523; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_5D2 :; } catch when(endfilter(obj4 is Exception & num != 0 & num6 == 0)) { Exception ex = (Exception)obj5; goto IL_5B9; } IL_5F5: throw ProjectData.CreateProjectError(-2146828237); IL_600: if (num6 != 0) { ProjectData.ClearProjectError(); } }
private void Button2_Click(object sender, EventArgs e) { this.Hide(); Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); Application.DocumentManager.MdiActiveDocument.LockDocument(); Point3d point = CAD.GetPoint("选择插入点: "); Point3d point3d; if (point != point3d) { string text = new DotNetBarcode { Type = DotNetBarcode.Types.QRCode, PrintCheckDigitChar = true }.QRCode_GetHeiBaiString(this.TextBox1.Text); short num; short num2; ObjectIdCollection objectIdCollection; short num4; short num5; checked { num = (short)Math.Round(Math.Sqrt((double)text.Length)); num2 = 100; objectIdCollection = new ObjectIdCollection(); short num3 = 0; num4 = num - 1; num5 = num3; } for (;;) { short num6 = num5; short num7 = num4; if (num6 > num7) { break; } short num8 = 0; short num9 = checked (num - 1); short num10 = num8; for (;;) { short num11 = num10; num7 = num9; if (num11 > num7) { break; } string left = text.Substring((int)(num5 * num + num10), 1); if (Operators.CompareString(left, "1", false) == 0) { Point3d point3d_; point3d_..ctor((double)(num5 * num2) + point.X, (double)((num - num10) * num2) + point.Y, 0.0); objectIdCollection.Add(this.method_0(point3d_, num2, num2)); } num10 += 1; } num5 += 1; } this.ToNiMingBlock(objectIdCollection); } }