示例#1
0
        static public void BreakPolyLine(ref Polyline pline, ref Point3dCollection pointList)
        {
            DBObjectCollection collection = new DBObjectCollection();

            pline.Explode(collection);

            System.Collections.IEnumerator Enumerator = collection.GetEnumerator();

            while (Enumerator.MoveNext() == true)
            {
                DBObject dbObject = (DBObject)Enumerator.Current;

                if (Line.GetClass(typeof(Line)) == dbObject.GetRXClass())
                {
                    Line line = (Line)dbObject;
                    BreakLine(ref line, ref pointList);
                    line.Dispose();
                }
                else if (Arc.GetClass(typeof(Arc)) == dbObject.GetRXClass())
                {
                    Arc arc = (Arc)dbObject;
                    BreakArc(ref arc, ref pointList);
                    arc.Dispose();
                }
            }
        }
示例#2
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();
            }
        }
示例#3
0
        public void TcJianTuDuiBi()
        {
            int    num;
            int    num5;
            object obj;

            try
            {
IL_01:
                ProjectData.ClearProjectError();
                num = -2;
IL_09:
                int num2 = 2;
                Polyline polyline = (Polyline)Class36.smethod_72("选择原配筋简图边框:");
IL_1C:
                num2 = 3;
                Class36.smethod_73(polyline.ObjectId);
IL_2A:
                num2 = 4;
                Polyline polyline2 = (Polyline)Class36.smethod_72("选择新配筋简图边框:");
IL_3D:
                num2 = 5;
                Class36.smethod_73(polyline2.ObjectId);
IL_4B:
                num2 = 6;
                Point3d  minPoint = polyline.GeometricExtents.MinPoint;
                Vector3d vectorTo = minPoint.GetVectorTo(polyline2.GeometricExtents.MinPoint);
IL_78:
                num2 = 7;
                Point3dCollection point3dCollection = new Point3dCollection();
IL_81:
                num2 = 8;
                Point3d minPoint2 = polyline.GeometricExtents.MinPoint;
IL_95:
                num2 = 9;
                Point3d maxPoint = polyline.GeometricExtents.MaxPoint;
IL_AA:
                num2 = 10;
                point3dCollection.Add(minPoint2);
IL_B7:
                num2 = 11;
                Point3dCollection point3dCollection2 = point3dCollection;
                minPoint..ctor(minPoint2.X, maxPoint.Y, minPoint2.Z);
                point3dCollection2.Add(minPoint);
IL_E0:
                num2 = 12;
                point3dCollection.Add(maxPoint);
IL_ED:
                num2 = 13;
                Point3dCollection point3dCollection3 = point3dCollection;
                minPoint..ctor(maxPoint.X, minPoint2.Y, minPoint2.Z);
                point3dCollection3.Add(minPoint);
IL_116:
                num2 = 14;
                TypedValue[] array = new TypedValue[1];
IL_120:
                num2 = 15;
                Array      array2 = array;
                TypedValue typedValue;
                typedValue..ctor(0, "TEXT");
                array2.SetValue(typedValue, 0);
IL_13D:
                num2 = 16;
                DBObjectCollection dbobjectCollection = 结构分析.WindowPolygon(point3dCollection, array);
IL_14A:
                num2 = 17;
                IEnumerator enumerator = dbobjectCollection.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    DBText dbtext = (DBText)enumerator.Current;
IL_170:
                    num2 = 18;
                    Application.DoEvents();
IL_178:
                    num2 = 19;
                    TypedValue[] array3 = new TypedValue[2];
IL_183:
                    num2 = 20;
                    Array array4 = array3;
                    typedValue..ctor(0, "TEXT");
                    array4.SetValue(typedValue, 0);
IL_1A1:
                    num2 = 21;
                    Array array5 = array3;
                    typedValue..ctor(8, dbtext.Layer);
                    array5.SetValue(typedValue, 1);
IL_1C1:
                    num2 = 22;
                    Point3d entCenter = CAD.GetEntCenter(dbtext);
IL_1CD:
                    num2 = 23;
                    entCenter..ctor(entCenter.X + vectorTo.X, entCenter.Y + vectorTo.Y, entCenter.Z + vectorTo.Z);
IL_204:
                    num2 = 24;
                    Point3dCollection point3dCollection4 = new Point3dCollection();
IL_20E:
                    num2 = 25;
                    double num3 = dbtext.Height / 3.0;
IL_224:
                    num2 = 26;
                    Point3dCollection point3dCollection5 = point3dCollection4;
                    minPoint..ctor(entCenter.X - num3, entCenter.Y - num3, entCenter.Z);
                    point3dCollection5.Add(minPoint);
IL_253:
                    num2 = 27;
                    Point3dCollection point3dCollection6 = point3dCollection4;
                    minPoint..ctor(entCenter.X - num3, entCenter.Y + num3, entCenter.Z);
                    point3dCollection6.Add(minPoint);
IL_282:
                    num2 = 28;
                    Point3dCollection point3dCollection7 = point3dCollection4;
                    minPoint..ctor(entCenter.X + num3, entCenter.Y + num3, entCenter.Z);
                    point3dCollection7.Add(minPoint);
IL_2B1:
                    num2 = 29;
                    Point3dCollection point3dCollection8 = point3dCollection4;
                    minPoint..ctor(entCenter.X + num3, entCenter.Y - num3, entCenter.Z);
                    point3dCollection8.Add(minPoint);
IL_2E0:
                    num2 = 30;
                    DBObjectCollection dbobjectCollection2 = 结构分析.CrossingPolygon(point3dCollection4, array3);
IL_2EE:
                    num2 = 31;
                    ObjectId objectId = dbobjectCollection2[0].ObjectId;
IL_300:
                    num2 = 32;
                    string textString = dbtext.TextString;
IL_30C:
                    num2 = 33;
                    string txt = this.GetTxt(objectId);
IL_319:
                    num2 = 34;
                    if (Operators.CompareString(textString, txt, false) == 0)
                    {
IL_32B:
                        num2 = 35;
                        Class36.smethod_64(objectId);
                    }
                    else
                    {
IL_338:
                        num2 = 37;
IL_33B:
                        num2 = 38;
                        bool flag = this.StrBiJiao(textString, txt);
IL_34A:
                        num2 = 39;
                        if (!flag)
                        {
IL_354:
                            num2 = 40;
                            this.method_1(objectId);
                        }
                        else
                        {
IL_362:
                            num2 = 42;
IL_365:
                            num2 = 43;
                            this.method_0(objectId);
                        }
                    }
IL_371:
                    num2 = 46;
                }
                if (enumerator is IDisposable)
                {
                    (enumerator as IDisposable).Dispose();
                }
IL_394:
                num2 = 47;
                Class36.smethod_74(polyline.ObjectId);
IL_3A3:
                num2 = 48;
                Class36.smethod_74(polyline2.ObjectId);
IL_3B2:
                num2 = 49;
                Interaction.MsgBox("简图对比完毕!", MsgBoxStyle.OkOnly, null);
IL_3C2:
                goto IL_4E8;
IL_3C7:
                int num4 = num5 + 1;
                num5     = 0;
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num4);
IL_49F:
                goto IL_4DD;
IL_4A1:
                num5 = num2;
                if (num <= -2)
                {
                    goto IL_3C7;
                }
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                IL_4BA :;
            }
            catch when(endfilter(obj is Exception & num != 0 & num5 == 0))
            {
                Exception ex = (Exception)obj2;

                goto IL_4A1;
            }
IL_4DD:
            throw ProjectData.CreateProjectError(-2146828237);
IL_4E8:
            if (num5 != 0)
            {
                ProjectData.ClearProjectError();
            }
        }