コード例 #1
0
        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();
        }
コード例 #2
0
        public void TcGangJinDuanMian()
        {
            Application.SetSystemVariable("ORTHOMODE", 0);
            double scale = CAD.GetScale();
            short  num2;

            do
            {
                JigEntIDs  jigEntIDs = new JigEntIDs();
                ObjectId[] array     = new ObjectId[1];
                ObjectId[] array2    = array;
                int        num       = 0;
                Point3d    point3d;
                point3d..ctor(0.0, 0.0, 0.0);
                array2[num] = Class36.smethod_16(point3d, 40.0 * scale, "墙柱纵筋");
                JigEntIDs  jigEntIDs2 = jigEntIDs;
                ObjectId[] entIDs     = array;
                point3d..ctor(0.0, 0.0, 0.0);
                num2 = jigEntIDs2.method_0(entIDs, point3d);
            }while (num2 != -1);
        }
コード例 #3
0
        public void FuJiaGuJin()
        {
            int    num;
            int    num10;
            object obj;

            try
            {
IL_01:
                ProjectData.ClearProjectError();
                num = -2;
IL_09:
                int num2 = 2;
                Point3d point = CAD.GetPoint("选择插入点: ");
IL_17:
                num2 = 3;
                Point3d point3d;
                if (!(point == point3d))
                {
                    goto IL_29;
                }
IL_24:
                goto IL_1F7;
IL_29:
                num2 = 6;
                bool flag = false;
IL_2E:
                num2 = 7;
IL_30:
                num2 = 8;
                Database workingDatabase = HostApplicationServices.WorkingDatabase;
IL_38:
                num2 = 9;
                Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
IL_4C:
                num2 = 10;
                PromptResult promptResult = editor.Drag(this);
IL_59:
                num2 = 11;
                ObjectId[] array = new ObjectId[6];
IL_64:
                num2 = 12;
                if (promptResult.Status != 5100)
                {
                    goto IL_10A;
                }
IL_7A:
                num2 = 13;
                short num5;
                short num6;
                checked
                {
                    short num3 = (short)(this.entity_0.Length - 1);
IL_89:
                    num2 = 14;
                    if (num3 != 0)
                    {
                        goto IL_A5;
                    }
IL_92:
                    num2 = 15;
                    CAD.AddEnt(this.entity_0[0]);
                    goto IL_10A;
IL_A5:
                    num2 = 17;
IL_A8:
                    num2 = 18;
                    short num4 = 0;
                    num5 = (short)(this.entity_0.Length - 1);
                    num6 = num4;
                }
                for (;;)
                {
                    short num7 = num6;
                    short num8 = num5;
                    if (num7 > num8)
                    {
                        break;
                    }
IL_BD:
                    num2             = 19;
                    array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId;
IL_E1:
                    num2  = 20;
                    num6 += 1;
                }
IL_F5:
                num2 = 21;
                if (!flag)
                {
                    goto IL_107;
                }
IL_FC:
                num2 = 22;
                Class36.smethod_55(array);
IL_107:
                num2 = 24;
IL_10A:
                num2 = 27;
                JigEntIDs jigEntIDs = new JigEntIDs();
IL_113:
                num2 = 28;
                jigEntIDs.method_0(array, this.point3d_1);
IL_125:
                goto IL_1F7;
IL_12A:
                int num9 = num10 + 1;
                num10    = 0;
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num9);
IL_1AE:
                goto IL_1EC;
IL_1B0:
                num10 = num2;
                if (num <= -2)
                {
                    goto IL_12A;
                }
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                IL_1C9 :;
            }
            catch when(endfilter(obj is Exception & num != 0 & num10 == 0))
            {
                Exception ex = (Exception)obj2;

                goto IL_1B0;
            }
IL_1EC:
            throw ProjectData.CreateProjectError(-2146828237);
IL_1F7:
            if (num10 != 0)
            {
                ProjectData.ClearProjectError();
            }
        }
コード例 #4
0
        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();
            }
        }