Example #1
0
 public static string Getsteels3(string S)
 {
     checked
     {
         short  num = (short)Strings.InStr(S, ";", CompareMethod.Binary);
         string result;
         if (num > 0)
         {
             string text  = S.Substring(0, (int)(num - 1));
             string text2 = S.Substring((int)num);
             string s     = text;
             int    num2  = 0;
             text = Conversions.ToString(JG.GetSteels1(s, ref num2));
             string s2 = text2;
             num2   = 0;
             text2  = Conversions.ToString(JG.GetSteels1(s2, ref num2));
             result = text + " / " + text2;
         }
         else
         {
             int num2 = 0;
             result = Conversions.ToString(JG.GetSteels1(S, ref num2));
         }
         return(result);
     }
 }
Example #2
0
 public static string XuanJin2(int MinD, int MaxD, long Area, short Nmin)
 {
     checked
     {
         long   num  = (long)Math.Round(unchecked (Math.Pow((double)MinD, 2.0) * 3.14) / 4.0);
         int    num2 = (int)Math.Round(Conversion.Fix((double)Area / (double)num));
         string text = "";
         if (num2 < 2)
         {
             text = "2D" + Conversions.ToString(MinD);
         }
         else
         {
             for (int i = MaxD; i >= MinD; i += -1)
             {
                 if (JG.isInArray(i))
                 {
                     int num3 = num2;
                     int num4 = (int)Nmin;
                     for (;;)
                     {
                         int num5 = num4;
                         int num6 = num3;
                         if (num5 > num6)
                         {
                             break;
                         }
                         long num7 = (long)Math.Round(unchecked ((double)num4 * Math.Pow((double)i, 2.0) * 3.14) / 4.0);
                         int  num8 = (int)Math.Round(unchecked ((double)(checked (num7 - Area)) / (double)Area * 100.0));
                         if (num8 < 10 & num8 > 0)
                         {
                             text = string.Concat(new string[]
                             {
                                 text,
                                 Conversions.ToString(num4),
                                 "D",
                                 Conversions.ToString(i),
                                 "(",
                                 Conversions.ToString(num8),
                                 ")/"
                             });
                         }
                         num4++;
                     }
                 }
             }
         }
         return(text);
     }
 }
Example #3
0
        public static string GetAs_Function(string Txt)
        {
            Txt = Strings.Replace(Txt, "-", "@", 1, -1, CompareMethod.Binary);
            string expression = Txt.Substring(0, 1);

            if (!Versioned.IsNumeric(expression))
            {
                int num = Strings.InStr(Txt, " ", CompareMethod.Binary);
                if (num > 0)
                {
                    Txt = Txt.Substring(num);
                    Txt = Strings.Trim(Txt);
                }
            }
            checked
            {
                short  num2 = (short)Strings.InStr(Txt, "@", CompareMethod.Binary);
                string result;
                if (num2 > 0)
                {
                    result = JG.GetSteels2(Txt);
                }
                else
                {
                    short num3 = (short)Strings.InStr(Txt, ";", CompareMethod.Binary);
                    if (num3 > 0)
                    {
                        result = JG.Getsteels3(Txt).ToString();
                    }
                    else
                    {
                        string s    = Txt;
                        int    num4 = 0;
                        result = JG.GetSteels1(s, ref num4).ToString();
                    }
                }
                return(result);
            }
        }
Example #4
0
        private short method_6(string[] string_5, ref double double_0, ref double double_1, ref double double_2, ref string[] string_6, ref long long_0, ref long long_1)
        {
            int    num;
            int    num15;
            object obj;

            try
            {
IL_01:
                ProjectData.ClearProjectError();
                num = -2;
IL_09:
                int num2 = 2;
IL_0B:
                num2 = 3;
                long num3 = (long)Information.UBound(string_5, 1);
IL_17:
                num2 = 4;
                short num4 = 0;
                short num5 = checked ((short)num3);
                short num6 = num4;
                int   num11;
                long  steels;
                long  steels2;
                long  steels3;
                for (;;)
                {
                    short num7 = num6;
                    short num8 = num5;
                    if (num7 > num8)
                    {
                        break;
                    }
IL_2E:
                    num2 = 5;
                    string text = string_5[(int)num6];
IL_36:
                    num2 = 6;
                    checked
                    {
                        int num9 = Strings.InStr(Strings.UCase(text), "X", CompareMethod.Binary) + Strings.InStr(text, " ", CompareMethod.Binary);
IL_5A:
                        num2 = 7;
                        string text2 = text.Substring(0, 1);
IL_67:
                        num2 = 8;
                        if (Strings.Asc(Strings.UCase(text2)) <= 90 & Strings.Asc(Strings.UCase(text2)) >= 65)
                        {
IL_92:
                            num2 = 9;
                        }
                        else
                        {
IL_9A:
                            num2 = 11;
IL_9D:
                            num2 = 12;
                            if (num9 > 0)
                            {
IL_A7:
                                num2   = 13;
                                long_0 = Conversions.ToLong(text.Substring(0, num9 - 1));
IL_BE:
                                num2   = 14;
                                long_1 = Conversions.ToLong(text.Substring(num9));
                            }
IL_D2:
                            num2 = 16;
                            if (Versioned.IsNumeric(text2) & num9 == 0)
                            {
IL_E4:
                                num2 = 17;
                                int num10;
                                if (num10 == 0)
                                {
IL_EE:
                                    num2   = 18;
                                    steels = this.GetSteels1(text, ref num11);
                                }
                                else
                                {
IL_FF:
                                    num2 = 20;
                                    if (num10 == 1)
                                    {
IL_109:
                                        num2 = 21;
                                        string s     = text;
                                        int    num12 = 0;
                                        steels2 = this.GetSteels1(s, ref num12);
                                    }
                                    else
                                    {
IL_11C:
                                        num2 = 23;
                                        if (num10 == 2)
                                        {
IL_126:
                                            num2 = 24;
                                            string s2    = text;
                                            int    num12 = 0;
                                            steels3 = this.GetSteels1(s2, ref num12);
                                        }
                                    }
                                }
IL_16A:
                                num2 = 26;
                                num10++;
                            }
                        }
IL_13A:
                        num2 = 29;
                        if (text.Contains("@"))
                        {
IL_14B:
                            num2           = 30;
                            this.KoyaxhoKD = JG.GetGuJin(text);
                        }
IL_15B:
                        num2 = 32;
                    }
                    num6 += 1;
                }
IL_175:
                num2 = 33;
                if (!(long_0 == 0L | long_1 == 0L))
                {
                    goto IL_19C;
                }
IL_197:
                goto IL_844;
IL_19C:
                num2 = 36;
                if (!(steels2 == 0L & steels3 == 0L))
                {
                    goto IL_201;
                }
IL_1BB:
                num2     = 37;
                double_0 = (double)steels / (double)num11 * 4.0;
IL_1D1:
                num2     = 38;
                double_1 = (double)steels / (double)num11 * ((double)(checked (num11 - 4)) / 4.0 + 2.0);
IL_1F7:
                num2     = 39;
                double_2 = double_1;
                goto IL_238;
IL_201:
                num2 = 41;
IL_204:
                num2     = 42;
                double_0 = (double)steels;
IL_20C:
                num2     = 43;
                double_1 = (double)steels / 2.0 + (double)steels2;
IL_221:
                num2     = 44;
                double_2 = (double)steels / 2.0 + (double)steels3;
IL_238:
                num2 = 46;
                long num13 = checked (steels + 2L * steels2 + 2L * steels3);
IL_258:
                num2     = 47;
                string_6 = new string[7];
IL_264:
                num2        = 50;
                string_6[0] = "柱子截面------" + Conversions.ToString(long_0) + "x" + Conversions.ToString(long_1);
IL_28B:
                num2 = 51;
                this.ListBox1.Items.Add(string_6[0]);
IL_2A4:
                num2        = 52;
                string_6[1] = "全截面As------" + Conversions.ToString(num13);
IL_2BD:
                num2 = 53;
                this.ListBox1.Items.Add(string_6[1]);
IL_2D6:
                num2        = 54;
                string_6[2] = "全截面ρ------" + Strings.Format((double)num13 / (double)long_0 / (double)long_1 * 100.0, "0.0000") + "%";
IL_313:
                num2 = 55;
                this.ListBox1.Items.Add(string_6[2]);
IL_32C:
                num2 = 56;
                checked
                {
                    string_6[3] = "角筋面积------" + Conversions.ToString((long)Math.Round(double_0 / 4.0)) + "x4=" + Conversions.ToString((long)Math.Round(double_0));
IL_367:
                    num2 = 57;
                    this.ListBox1.Items.Add(string_6[3]);
IL_380:
                    num2        = 58;
                    string_6[4] = "单侧As----X=" + Conversions.ToString((long)Math.Round(double_1)) + " / Y= " + Conversions.ToString((long)Math.Round(double_2));
IL_3B2:
                    num2 = 59;
                    this.ListBox1.Items.Add(string_6[4]);
IL_3CB:
                    num2        = 60;
                    string_6[5] = string.Concat(unchecked (new string[]
                    {
                        "单侧ρ----X=",
                        Strings.Format(double_1 / (double)long_0 / (double)long_1 * 100.0, "0.0000"),
                        "% / Y= ",
                        Strings.Format(double_2 / (double)long_0 / (double)long_1 * 100.0, "0.0000"),
                        "%"
                    }));
IL_450:
                    num2 = 61;
                    this.ListBox1.Items.Add(string_6[5]);
IL_469:
                    num2 = 62;
                    if (this.KoyaxhoKD.AsvD == 0)
                    {
                        goto IL_4AD;
                    }
IL_47F:
                    num2 = 63;
                    this.ListBox1.Items.Add("箍筋直径------" + Conversions.ToString((int)this.KoyaxhoKD.AsvD));
IL_4AD:
                    num2 = 65;
                    if (this.KoyaxhoKD.JianJu1 == 0L)
                    {
                        goto IL_4F9;
                    }
IL_4CB:
                    num2 = 66;
                    this.ListBox1.Items.Add("加密区间距----" + Conversions.ToString(this.KoyaxhoKD.JianJu1));
IL_4F9:
                    num2 = 68;
                    if (this.KoyaxhoKD.JianJu2 == 0L)
                    {
                        goto IL_545;
                    }
IL_517:
                    num2 = 69;
                    this.ListBox1.Items.Add("非加密区间距--" + Conversions.ToString(this.KoyaxhoKD.JianJu2));
IL_545:
                    num2 = 71;
                    if (this.KoyaxhoKD.Asv1 == 0L)
                    {
                        goto IL_591;
                    }
IL_563:
                    num2 = 72;
                    this.ListBox1.Items.Add("加密区间距----" + Conversions.ToString(this.KoyaxhoKD.Asv1));
IL_591:
                    num2 = 74;
                    if (this.KoyaxhoKD.Asv2 == 0L)
                    {
                        goto IL_5DD;
                    }
IL_5AF:
                    num2 = 75;
                    this.ListBox1.Items.Add("非加密区间距--" + Conversions.ToString(this.KoyaxhoKD.Asv2));
IL_5DD:
                    num2 = 77;
                    if (this.KoyaxhoKD.Asv2 != 0L)
                    {
                        goto IL_611;
                    }
IL_5F8:
                    num2 = 78;
                    this.KoyaxhoKD.Asv2 = this.KoyaxhoKD.Asv1;
IL_611:
                    num2 = 80;
                    this.Label11.Text = "G" + Strings.Format((double)(this.KoyaxhoKD.Asv1 * 100L) / (double)this.KoyaxhoKD.JianJu1 / 1000.0, "0.0") + "-" + Strings.Format((double)(this.KoyaxhoKD.Asv2 * 100L) / (double)this.KoyaxhoKD.JianJu1 / 1000.0, "0.0");
IL_6A6:
                    goto IL_844;
                    IL_6AB :;
                }
                int num14 = num15 + 1;
                num15 = 0;
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num14);
IL_7FD:
                goto IL_839;
IL_7FF:
                num15 = num2;
                if (num <= -2)
                {
                    goto IL_6AB;
                }
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                IL_817 :;
            }
            catch when(endfilter(obj is Exception & num != 0 & num15 == 0))
            {
                Exception ex = (Exception)obj2;

                goto IL_7FF;
            }
IL_839:
            throw ProjectData.CreateProjectError(-2146828237);
IL_844:
            short num16;
            short result = num16;

            if (num15 != 0)
            {
                ProjectData.ClearProjectError();
            }
            return(result);
        }
Example #5
0
        public void TcLJM()
        {
            LJM_Frm ljm_Frm = new LJM_Frm();

            ljm_Frm.ShowDialog();
            checked
            {
                if (ljm_Frm.DialogResult == DialogResult.OK)
                {
                    string text = ljm_Frm.TextBox1.Text;
                    text = text.Replace("\\", "/");
                    text = text.Replace(" ", "/");
                    text = text.Replace(",", "/");
                    text = text.Replace(",", "/");
                    text = text.Replace("、", "/");
                    int     num   = Strings.InStr(text, "/", CompareMethod.Binary);
                    long    num2  = (long)Math.Round(unchecked (Conversion.Val(text.Substring(0, checked (num - 1))) * 5.0));
                    long    num3  = (long)Math.Round(unchecked (Conversion.Val(text.Substring(num, checked (text.Length - num))) * 5.0));
                    Point3d point = CAD.GetPoint("选择插入点: ");
                    Point3d point3d;
                    if (!(point == point3d))
                    {
                        Point3d pointXY     = CAD.GetPointXY(point, (double)num2 / 2.0, (double)num3 / 2.0);
                        Point3d pointXY2    = CAD.GetPointXY(point, (double)(0L - num2) / 2.0, (double)num3 / 2.0);
                        Point3d pointXY3    = CAD.GetPointXY(point, (double)(0L - num2) / 2.0, (double)(0L - num3) / 2.0);
                        Point3d pointXY4    = CAD.GetPointXY(point, (double)num2 / 2.0, (double)(0L - num3) / 2.0);
                        Point3d pointAngle  = CAD.GetPointAngle(pointXY, 250.0, -135.0);
                        Point3d point3d2    = CAD.GetPointAngle(pointXY2, 250.0, -45.0);
                        Point3d pointAngle2 = CAD.GetPointAngle(pointXY3, 250.0, 45.0);
                        Point3d pointAngle3 = CAD.GetPointAngle(pointXY4, 250.0, 135.0);
                        Point3d pointXY5    = CAD.GetPointXY(point, (double)(0L - num2) / 2.0, (double)(0L - num3) / 2.0);
                        CAD.AddPlinePxy(pointXY5, (double)num2, (double)num3, 0.0, "");
                        text = JG.ReplaceGJ(ljm_Frm.TextBox2.Text);
                        num  = NF.InStr_N(text, "/");
                        Point3d[] array;
                        Point3d[] array2;
                        if (num == 1)
                        {
                            short num4 = (short)Strings.InStr(text, "/", CompareMethod.Binary);
                            short num5 = (short)Math.Round(Conversion.Val(text.Substring((int)(num4 - 9), 1)));
                            short num6 = (short)Math.Round(Conversion.Val(text.Substring((int)num4, 1)));
                            array    = new Point3d[(int)(unchecked (num5 + num6) - 1 + 1)];
                            array2   = new Point3d[(int)(num5 - 3 + 1)];
                            array[0] = point3d2;
                            Class36.smethod_16(array[0], 50.0, "墙柱纵筋");
                            array[(int)(unchecked (num5 + num6) - 1)] = pointAngle;
                            Class36.smethod_16(array[(int)(unchecked (num5 + num6) - 1)], 50.0, "墙柱纵筋");
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num5 - 2 + 1));
                            short num7 = 1;
                            short num8 = num5 - 2;
                            num4 = num7;
                            for (;;)
                            {
                                short num9  = num4;
                                short num10 = num8;
                                if (num9 > num10)
                                {
                                    break;
                                }
                                array[(int)num4] = CAD.GetPointXY(array[0], (double)(num * (int)num4), 0.0);
                                Class36.smethod_16(array[(int)num4], 50.0, "墙柱纵筋");
                                array2[(int)(num4 - 1)] = array[(int)num4];
                                unchecked
                                {
                                    num4 += 1;
                                }
                            }
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num6 - 1));
                            short num11 = num5;
                            short num12 = unchecked (num5 + num6) - 1;
                            num4 = num11;
                            for (;;)
                            {
                                short num13 = num4;
                                short num10 = num12;
                                if (num13 > num10)
                                {
                                    break;
                                }
                                array[(int)num4] = CAD.GetPointXY(array[0], (double)(num * (int)(unchecked (num4 - num5))), -150.0);
                                Class36.smethod_16(array[(int)num4], 50.0, "墙柱纵筋");
                                unchecked
                                {
                                    num4 += 1;
                                }
                            }
                            Class36.smethod_83(array, 500L, text, 1, 100.0);
                        }
                        else if (num == 2)
                        {
                            short num14 = (short)Strings.InStr(text, "/", CompareMethod.Binary);
                            short num15 = (short)Math.Round(Conversion.Val(text.Substring((int)(num14 - 9), 1)));
                            short num16 = (short)Math.Round(Conversion.Val(text.Substring((int)num14, 1)));
                            short num17 = (short)Math.Round(Conversion.Val(text.Substring((int)(num14 + 9), 1)));
                            array    = new Point3d[(int)(unchecked (num15 + num16 + num17) - 1 + 1)];
                            array2   = new Point3d[(int)(num15 - 3 + 1)];
                            array[0] = point3d2;
                            Class36.smethod_16(array[0], 50.0, "墙柱纵筋");
                            array[(int)(unchecked (num15 + num16 + num17) - 1)] = pointAngle;
                            Class36.smethod_16(array[(int)(unchecked (num15 + num16 + num17) - 1)], 50.0, "墙柱纵筋");
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num15 - 2 + 1));
                            short num18 = 1;
                            short num19 = num15 - 2;
                            num14 = num18;
                            for (;;)
                            {
                                short num20 = num14;
                                short num10 = num19;
                                if (num20 > num10)
                                {
                                    break;
                                }
                                array[(int)num14] = CAD.GetPointXY(array[0], (double)(num * (int)num14), 0.0);
                                Class36.smethod_16(array[(int)num14], 50.0, "墙柱纵筋");
                                array2[(int)(num14 - 1)] = array[(int)num14];
                                unchecked
                                {
                                    num14 += 1;
                                }
                            }
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num16 - 1));
                            short num21 = num15;
                            short num22 = unchecked (num15 + num16) - 1;
                            num14 = num21;
                            for (;;)
                            {
                                short num23 = num14;
                                short num10 = num22;
                                if (num23 > num10)
                                {
                                    break;
                                }
                                array[(int)num14] = CAD.GetPointXY(array[0], (double)(num * (int)(unchecked (num14 - num15))), -150.0);
                                Class36.smethod_16(array[(int)num14], 50.0, "墙柱纵筋");
                                unchecked
                                {
                                    num14 += 1;
                                }
                            }
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num17 - 1));
                            short num24 = unchecked (num15 + num16);
                            short num25 = unchecked (num15 + num16 + num17) - 1;
                            num14 = num24;
                            for (;;)
                            {
                                short num26 = num14;
                                short num10 = num25;
                                if (num26 > num10)
                                {
                                    break;
                                }
                                array[(int)num14] = CAD.GetPointXY(array[0], (double)(num * (int)(unchecked (num14 - num15 - num16))), -300.0);
                                Class36.smethod_16(array[(int)num14], 50.0, "墙柱纵筋");
                                unchecked
                                {
                                    num14 += 1;
                                }
                            }
                            Class36.smethod_83(array, 500L, text, 1, 100.0);
                        }
                        else
                        {
                            short num27 = (short)Strings.InStr(text, "+", CompareMethod.Binary);
                            short num28;
                            if (num27 > 0)
                            {
                                num28 = (short)Math.Round(unchecked (Conversion.Val(text.Substring((int)(checked (num27 - 9)), 1)) + Conversion.Val(text.Substring((int)num27, 1))));
                            }
                            else
                            {
                                num28 = (short)Math.Round(Conversion.Val(text.Substring(0, 1)));
                            }
                            array    = new Point3d[(int)(num28 - 1 + 1)];
                            array2   = new Point3d[(int)(num28 - 3 + 1)];
                            array[0] = point3d2;
                            Class36.smethod_16(array[0], 50.0, "墙柱纵筋");
                            array[(int)(num28 - 1)] = pointAngle;
                            Class36.smethod_16(array[(int)(num28 - 1)], 50.0, "墙柱纵筋");
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num28 - 2 + 1));
                            short num29 = 1;
                            short num30 = num28 - 2;
                            num27 = num29;
                            for (;;)
                            {
                                short num31 = num27;
                                short num10 = num30;
                                if (num31 > num10)
                                {
                                    break;
                                }
                                array[(int)num27] = CAD.GetPointXY(array[0], (double)(num * (int)num27), 0.0);
                                Class36.smethod_16(array[(int)num27], 50.0, "墙柱纵筋");
                                array2[(int)(num27 - 1)] = array[(int)num27];
                                unchecked
                                {
                                    num27 += 1;
                                }
                            }
                            Class36.smethod_83(array, 500L, text, 1, 100.0);
                        }
                        text = JG.ReplaceGJ(ljm_Frm.TextBox3.Text);
                        num  = NF.InStr_N(text, "/");
                        if (num == 1)
                        {
                            short num32 = (short)Strings.InStr(text, "/", CompareMethod.Binary);
                            short num33 = (short)Math.Round(Conversion.Val(text.Substring((int)(num32 - 9), 1)));
                            short num34 = (short)Math.Round(Conversion.Val(text.Substring((int)num32, 1)));
                            array    = new Point3d[(int)(unchecked (num34 + num33) - 1 + 1)];
                            array[0] = pointAngle2;
                            Class36.smethod_16(array[0], 50.0, "墙柱纵筋");
                            array[(int)(unchecked (num34 + num33) - 1)] = pointAngle3;
                            Class36.smethod_16(array[(int)(unchecked (num34 + num33) - 1)], 50.0, "墙柱纵筋");
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num34 - 2 + 1));
                            short num35 = 1;
                            short num36 = num34 - 2;
                            num32 = num35;
                            for (;;)
                            {
                                short num37 = num32;
                                short num10 = num36;
                                if (num37 > num10)
                                {
                                    break;
                                }
                                array[(int)num32] = CAD.GetPointXY(array[0], (double)(num * (int)num32), 0.0);
                                Class36.smethod_16(array[(int)num32], 50.0, "墙柱纵筋");
                                unchecked
                                {
                                    num32 += 1;
                                }
                            }
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num33 - 1));
                            short num38 = num34;
                            short num39 = unchecked (num34 + num33) - 1;
                            num32 = num38;
                            for (;;)
                            {
                                short num40 = num32;
                                short num10 = num39;
                                if (num40 > num10)
                                {
                                    break;
                                }
                                array[(int)num32] = CAD.GetPointXY(array[0], (double)(num * (int)(unchecked (num32 - num34))), 150.0);
                                Class36.smethod_16(array[(int)num32], 50.0, "墙柱纵筋");
                                unchecked
                                {
                                    num32 += 1;
                                }
                            }
                            Class36.smethod_83(array, 500L, text, 4, 100.0);
                        }
                        else if (num == 2)
                        {
                            short num41 = (short)Strings.InStr(text, "/", CompareMethod.Binary);
                            short num42 = (short)Math.Round(Conversion.Val(text.Substring((int)(num41 - 9), 1)));
                            short num43 = (short)Math.Round(Conversion.Val(text.Substring((int)num41, 1)));
                            short num44 = (short)Math.Round(Conversion.Val(text.Substring((int)(num41 + 9), 1)));
                            array    = new Point3d[(int)(unchecked (num44 + num43 + num42) - 1 + 1)];
                            array[0] = pointAngle2;
                            Class36.smethod_16(array[0], 50.0, "墙柱纵筋");
                            array[(int)(unchecked (num44 + num43 + num42) - 1)] = pointAngle3;
                            Class36.smethod_16(array[(int)(unchecked (num44 + num43 + num42) - 1)], 50.0, "墙柱纵筋");
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num44 - 2 + 1));
                            short num45 = 1;
                            short num46 = num44 - 2;
                            num41 = num45;
                            for (;;)
                            {
                                short num47 = num41;
                                short num10 = num46;
                                if (num47 > num10)
                                {
                                    break;
                                }
                                array[(int)num41] = CAD.GetPointXY(array[0], (double)(num * (int)num41), 0.0);
                                Class36.smethod_16(array[(int)num41], 50.0, "墙柱纵筋");
                                unchecked
                                {
                                    num41 += 1;
                                }
                            }
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num43 - 1));
                            short num48 = num44;
                            short num49 = unchecked (num44 + num43) - 1;
                            num41 = num48;
                            for (;;)
                            {
                                short num50 = num41;
                                short num10 = num49;
                                if (num50 > num10)
                                {
                                    break;
                                }
                                array[(int)num41] = CAD.GetPointXY(array[0], (double)(num * (int)(unchecked (num41 - num44))), 150.0);
                                Class36.smethod_16(array[(int)num41], 50.0, "墙柱纵筋");
                                unchecked
                                {
                                    num41 += 1;
                                }
                            }
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num42 - 1));
                            short num51 = unchecked (num44 + num43);
                            short num52 = unchecked (num44 + num43 + num42) - 1;
                            num41 = num51;
                            for (;;)
                            {
                                short num53 = num41;
                                short num10 = num52;
                                if (num53 > num10)
                                {
                                    break;
                                }
                                array[(int)num41] = CAD.GetPointXY(array[0], (double)(num * (int)(unchecked (num41 - num44 - num43))), 300.0);
                                Class36.smethod_16(array[(int)num41], 50.0, "墙柱纵筋");
                                unchecked
                                {
                                    num41 += 1;
                                }
                            }
                            Class36.smethod_83(array, 500L, text, 4, 100.0);
                        }
                        else
                        {
                            short num54 = (short)Strings.InStr(text, "+", CompareMethod.Binary);
                            short num55;
                            if (num54 > 0)
                            {
                                num55 = (short)Math.Round(unchecked (Conversion.Val(text.Substring((int)(checked (num54 - 9)), 1)) + Conversion.Val(text.Substring((int)num54, 1))));
                            }
                            else
                            {
                                num55 = (short)Math.Round(Conversion.Val(text.Substring(0, 1)));
                            }
                            array    = new Point3d[(int)(num55 - 1 + 1)];
                            array[0] = pointAngle2;
                            Class36.smethod_16(array[0], 50.0, "墙柱纵筋");
                            array[(int)(num55 - 1)] = pointAngle3;
                            Class36.smethod_16(array[(int)(num55 - 1)], 50.0, "墙柱纵筋");
                            num = (int)Math.Round((double)(num2 - 354L) / (double)(num55 - 2 + 1));
                            short num56 = 1;
                            short num57 = num55 - 2;
                            num54 = num56;
                            for (;;)
                            {
                                short num58 = num54;
                                short num10 = num57;
                                if (num58 > num10)
                                {
                                    break;
                                }
                                array[(int)num54] = CAD.GetPointXY(array[0], (double)(num * (int)num54), 0.0);
                                Class36.smethod_16(array[(int)num54], 50.0, "墙柱纵筋");
                                unchecked
                                {
                                    num54 += 1;
                                }
                            }
                            Class36.smethod_83(array, 500L, text, 4, 100.0);
                        }
                        object   obj          = CAD.CreateTextStyle("Tc_尺寸标注", "txt.shx", "hztxt.Shx", 0.7);
                        string   dimStyleName = "Tc_Dim100";
                        object   obj2         = obj;
                        ObjectId objectId;
                        ObjectId dimID = CAD.CreateDimStyle(dimStyleName, (obj2 != null) ? ((ObjectId)obj2) : objectId, 100, 1.0, false, -1.0);
                        unchecked
                        {
                            pointXY5 = CAD.GetPointXY(point, (double)(checked (0L - num2)) / 2.0 - 500.0, 0.0);
                            CAD.AddLineDim(pointXY2, pointXY3, pointXY5, 0.2, dimID, -1.0);
                            pointXY5 = CAD.GetPointXY(point, 0.0, (double)(checked (0L - num3)) / 2.0 - 1000.0);
                            CAD.AddLineDim(pointXY3, pointXY4, pointXY5, 0.2, dimID, -1.0);
                            string string_;
                            if (Conversions.ToDouble(ljm_Frm.TextBox7.Text) == 0.0)
                            {
                                string_ = "%%p0.000";
                            }
                            else
                            {
                                string_ = ljm_Frm.TextBox7.Text;
                            }
                            if (Operators.CompareString(ljm_Frm.Button1.Text, "顶部标高", false) == 0)
                            {
                                pointXY5 = CAD.GetPointXY(point, (double)(checked (0L - num2)) / 2.0 - 650.0, (double)num3 / 2.0);
                                Class36.smethod_81(pointXY5, 2, 1.0);
                                pointXY5 = CAD.GetPointXY(pointXY5, -300.0, 350.0);
                                Class36.smethod_57(string_, pointXY5, 300.0, 2, 0, "STANDARD", 0.0);
                            }
                            else
                            {
                                pointXY5 = CAD.GetPointXY(point, (double)(checked (0L - num2)) / 2.0 - 650.0, (double)(checked (0L - num3)) / 2.0);
                                Class36.smethod_81(pointXY5, 3, 1.0);
                                pointXY5 = CAD.GetPointXY(pointXY5, -300.0, -350.0);
                                Class36.smethod_57(string_, pointXY5, 300.0, 2, 3, "STANDARD", 0.0);
                            }
                        }
                        if (Operators.CompareString(ljm_Frm.TextBox5.Text, "", false) != 0)
                        {
                            text = JG.ReplaceGJ(ljm_Frm.TextBox5.Text);
                            num  = (int)Math.Round(Conversion.Val(text.Substring(0, 1)));
                            if (num % 2 == 0)
                            {
                                num  = (int)Math.Round((double)num / 2.0);
                                text = Conversions.ToString(2) + text.Substring(1, text.Length - 1);
                                short num59 = 0;
                                short num60 = (short)(num - 1);
                                short num61 = num59;
                                unchecked
                                {
                                    for (;;)
                                    {
                                        short num62 = num61;
                                        short num10 = num60;
                                        if (num62 > num10)
                                        {
                                            break;
                                        }
                                        array    = new Point3d[3];
                                        array[0] = CAD.GetPointXY(pointAngle2, 0.0, checked ((double)(num3 - 354L) / (double)(num + 1)) * (double)(checked (num61 + 1)));
                                        Class36.smethod_16(array[0], 50.0, "墙柱纵筋");
                                        array[2] = CAD.GetPointXY(pointAngle3, 0.0, checked ((double)(num3 - 354L) / (double)(num + 1)) * (double)(checked (num61 + 1)));
                                        Class36.smethod_16(array[2], 50.0, "墙柱纵筋");
                                        Class36.smethod_7(array[0], array[2]);
                                        array[1] = Class36.smethod_46(array[0], array[2]);
                                        array[1] = CAD.GetPointXY(array[1], 0.0, 74.0);
                                        Class36.smethod_83(array, 300L, text, 1, 100.0);
                                        num61 += 1;
                                    }
                                }
                            }
                        }
                        else
                        {
                            num = 2;
                        }
                        pointAngle = CAD.GetPointAngle(pointXY2, 100.0, -45.0);
                        point3d2   = CAD.GetPointAngle(pointXY4, 100.0, 135.0);
                        Class36.smethod_9(pointAngle, point3d2);
                        array = new Point3d[]
                        {
                            CAD.GetPointXY(point3d2, 0.0, (double)(num3 - 354L) / unchecked ((double)num / 2.0 + 1.0) / 2.0)
                        };
                        text = JG.ReplaceGJ(ljm_Frm.TextBox4.Text);
                        Class36.smethod_83(array, 0L, text, 1, 100.0);
                        num = Strings.InStr(text, "(", CompareMethod.Binary);
                        if (num != 0)
                        {
                            short num63 = Conversions.ToShort(text.Substring(num, 1));
                            if (num63 == 3)
                            {
                                Class36.smethod_7(array2[0], CAD.GetPointXY(array2[0], 0.0, (double)(0L - num3 + 354L)));
                            }
                            else if (num63 == 4)
                            {
                                pointAngle = CAD.GetPointAngle(array2[0], 150.0, 135.0);
                                point3d2   = CAD.GetPointXY(array2[0], unchecked (array2[1].X - array2[0].X), (double)(0L - num3 + 354L));
                                point3d2   = CAD.GetPointAngle(point3d2, 150.0, -45.0);
                                Class36.smethod_9(pointAngle, point3d2);
                            }
                        }
                        pointXY5 = CAD.GetPointXY(point, -400.0, unchecked ((double)(checked (0L - num3)) / 2.0 - 2500.0));
                        Class36.smethod_6(pointXY5, "L1", 100.0, "1:20");
                    }
                }
            }
        }
Example #6
0
        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();
            }
        }
Example #7
0
        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();
            }
        }
Example #8
0
 public static string XuanJin(int MinD, int MaxD, long Area)
 {
     checked
     {
         long   num    = (long)Math.Round(unchecked (Math.Pow((double)MinD, 2.0) * 3.14) / 4.0);
         int    num2   = (int)Math.Round(Conversion.Fix((double)Area / (double)num));
         int    num3   = 100;
         string result = "";
         if (num2 < 2)
         {
             result = "2D" + Conversions.ToString(MinD);
         }
         else
         {
             for (int i = MinD; i <= MaxD; i++)
             {
                 if (JG.isInArray(i))
                 {
                     int num4 = 0;
                     int num5 = num2;
                     int num6 = num4;
                     for (;;)
                     {
                         int num7 = num6;
                         int num8 = num5;
                         if (num7 > num8)
                         {
                             break;
                         }
                         for (int j = MinD; j <= MaxD; j++)
                         {
                             int num9  = 0;
                             int num10 = num2;
                             int num11 = num9;
                             for (;;)
                             {
                                 int num12 = num11;
                                 num8 = num10;
                                 if (num12 > num8)
                                 {
                                     break;
                                 }
                                 if (JG.isInArray(j))
                                 {
                                     long num13 = (long)Math.Round(unchecked ((double)num6 * Math.Pow((double)i, 2.0) * 3.14 / 4.0 + (double)num11 * Math.Pow((double)j, 2.0) * 3.14 / 4.0));
                                     int  num14 = (int)Math.Round(unchecked ((double)(checked (num13 - Area)) / (double)Area * 100.0));
                                     if (num14 <5 & num14> -5)
                                     {
                                         if (i == j)
                                         {
                                             result = string.Concat(new string[]
                                             {
                                                 Conversions.ToString(num6 + num11),
                                                 "D",
                                                 Conversions.ToString(i),
                                                 " / ",
                                                 Conversions.ToString(num13),
                                                 "(",
                                                 Conversions.ToString(num14),
                                                 "%)"
                                             });
                                         }
                                         else if (num6 == 0)
                                         {
                                             result = string.Concat(new string[]
                                             {
                                                 Conversions.ToString(num11),
                                                 "D",
                                                 Conversions.ToString(j),
                                                 " / ",
                                                 Conversions.ToString(num13),
                                                 "(",
                                                 Conversions.ToString(num14),
                                                 "%)"
                                             });
                                         }
                                         else if (num11 == 0)
                                         {
                                             result = string.Concat(new string[]
                                             {
                                                 Conversions.ToString(num6),
                                                 "D",
                                                 Conversions.ToString(i),
                                                 " / ",
                                                 Conversions.ToString(num13),
                                                 "(",
                                                 Conversions.ToString(num14),
                                                 "%)"
                                             });
                                         }
                                         else
                                         {
                                             result = string.Concat(new string[]
                                             {
                                                 Conversions.ToString(num6),
                                                 "D",
                                                 Conversions.ToString(i),
                                                 "+",
                                                 Conversions.ToString(num11),
                                                 "D",
                                                 Conversions.ToString(j),
                                                 " / ",
                                                 Conversions.ToString(num13),
                                                 "(",
                                                 Conversions.ToString(num14),
                                                 "%)"
                                             });
                                         }
                                     }
                                     if (num3 > Math.Abs(num14))
                                     {
                                         num3 = Math.Abs(num14);
                                         if (i == j)
                                         {
                                             result = Conversions.ToString(num6 + num11) + "D" + Conversions.ToString(i);
                                         }
                                         else
                                         {
                                             result = string.Concat(new string[]
                                             {
                                                 Conversions.ToString(num6),
                                                 "D",
                                                 Conversions.ToString(i),
                                                 "+",
                                                 Conversions.ToString(num11),
                                                 "D",
                                                 Conversions.ToString(j)
                                             });
                                         }
                                     }
                                 }
                                 num11++;
                             }
                         }
                         num6++;
                     }
                 }
             }
         }
         return(result);
     }
 }