Ejemplo n.º 1
0
        public void TcDDX2()
        {
            this.double_0  = CAD.GetScale();
            this.point3d_0 = CAD.GetPoint("选择插入点: ");
            Point3d point3d;

            if (!(this.point3d_0 == point3d))
            {
                ObjectId[]   array           = new ObjectId[7];
                Database     workingDatabase = HostApplicationServices.WorkingDatabase;
                Editor       editor          = Application.DocumentManager.MdiActiveDocument.Editor;
                PromptResult promptResult    = editor.Drag(this);
                if (promptResult.Status == 5100)
                {
                    array[0] = CAD.AddEnt(this.entity_0[0]).ObjectId;
                    array[1] = CAD.AddEnt(this.entity_0[1]).ObjectId;
                    array[2] = CAD.AddEnt(this.entity_0[2]).ObjectId;
                    array[3] = CAD.AddEnt(this.entity_0[3]).ObjectId;
                    array[4] = CAD.AddEnt(this.entity_0[4]).ObjectId;
                    array[5] = CAD.AddEnt(this.entity_0[5]).ObjectId;
                    array[6] = CAD.AddEnt(this.entity_0[6]).ObjectId;
                    Class36.smethod_55(array);
                }
            }
        }
Ejemplo n.º 2
0
 // Token: 0x060012F2 RID: 4850 RVA: 0x00004682 File Offset: 0x00002882
 internal void method_12(object object_0, Class36 class36_0)
 {
     if (this.delegate131_0 != null)
     {
         this.delegate131_0(object_0, class36_0);
     }
 }
Ejemplo n.º 3
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();
        }
Ejemplo n.º 4
0
        private static PdfFont smethod_0(
            PdfBody body,
            string pdfFontID,
            WW.Pdf.Font.Font font,
            ns0.Class30 cidFont)
        {
            PdfIndirectObject <PdfFontFile> pdfIndirectObject1 = new PdfIndirectObject <PdfFontFile>(new PdfFontFile(font.Descriptor.FontData));
            Class40 class40 = PdfFontCreator.smethod_4(pdfFontID, (IFontMetric)cidFont);
            PdfIndirectObject <Class40> pdfIndirectObject2 = new PdfIndirectObject <Class40>(class40);

            class40.FontFile2 = pdfIndirectObject1;
            Class39 class39 = new Class39(cidFont.Registry, cidFont.Ordering, cidFont.Supplement);
            Class35 class35 = new Class35(PdfFontSubTypeEnum.CIDFontType2, font.FontName);

            class35.SystemInfo   = class39;
            class35.Descriptor   = pdfIndirectObject2;
            class35.DefaultWidth = cidFont.DefaultWidth;
            class35.Widths       = cidFont.WArray;
            PdfCMap pdfCmap = new PdfCMap();

            pdfCmap.AddFilter((IFilter) new FlateFilter());
            pdfCmap.SystemInfo = class39;
            pdfCmap.AddBfRanges(cidFont.CMapEntries);
            PdfIndirectObject <PdfCMap> pdfIndirectObject3 = new PdfIndirectObject <PdfCMap>(pdfCmap);
            Class36 class36 = new Class36(pdfFontID, font.FontName);

            class36.Encoding   = cidFont.Encoding;
            class36.Descendant = class35;
            class36.ToUnicode  = pdfIndirectObject3;
            body.IndirectObjects.Add((IPdfIndirectObject)pdfIndirectObject2);
            body.IndirectObjects.Add((IPdfIndirectObject)class35);
            body.IndirectObjects.Add((IPdfIndirectObject)pdfIndirectObject3);
            body.IndirectObjects.Add((IPdfIndirectObject)pdfIndirectObject1);
            return((PdfFont)class36);
        }
Ejemplo n.º 5
0
        public void CreatedimStyle()
        {
            string text = Interaction.InputBox("输入标注样式的名称、全局标注比例、测量标注比例,用/分开。", "田草CAD工具箱.Net版", "Dim100/100/1", -1, -1);

            string[] array = new string[3];
            string   s     = text;
            string   text2 = "/";

            NF.Str2Arr(s, ref array, ref text2);
            if (Operators.CompareString(array[0], "", false) != 0)
            {
                string   text3           = array[0];
                int      int_            = Conversions.ToInteger(array[1]);
                double   double_         = Conversions.ToDouble(array[2]);
                Database workingDatabase = HostApplicationServices.WorkingDatabase;
                Editor   editor          = Application.DocumentManager.MdiActiveDocument.Editor;
                using (Transaction transaction = workingDatabase.TransactionManager.StartTransaction())
                {
                    DimStyleTable dimStyleTable = (DimStyleTable)transaction.GetObject(workingDatabase.DimStyleTableId, 1);
                    ObjectId      objectId      = Class36.smethod_78(text3, int_, double_, false);
                    if (objectId != ObjectId.Null)
                    {
                        DimStyleTableRecord dimStyleTableRecord = (DimStyleTableRecord)transaction.GetObject(objectId, 1);
                    }
                    else
                    {
                        editor.WriteMessage("\r标注样式 " + text3 + " 已存在!");
                    }
                    transaction.Commit();
                }
            }
        }
Ejemplo n.º 6
0
        private void RadioButton2_Click(object sender, EventArgs e)
        {
            TypedValue[] array  = new TypedValue[1];
            Array        array2 = array;
            TypedValue   typedValue;

            typedValue..ctor(0, "TEXT");
            array2.SetValue(typedValue, 0);
            SelectionFilter selectionFilter = new SelectionFilter(array);

            this.RadioButton2.Checked = true;
            this.Hide();
            Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle);
            PromptSelectionResult selection = this.document_0.Editor.GetSelection(selectionFilter);

            if (selection.Status == 5100)
            {
                this.selectionSet_0 = selection.Value;
                this.long_0         = (long)this.selectionSet_0.Count;
                if (this.long_0 == 0L)
                {
                    Class36.smethod_60("没有选择任何文字对象\r\n");
                }
                else
                {
                    Class36.smethod_60("当前选择集体" + this.long_0.ToString() + "个文字对象\r\n");
                }
                this.Show();
            }
            this.Button1.Enabled = true;
            this.Button2.Enabled = true;
            this.Button3.Enabled = true;
            this.Label3.Text     = "";
        }
Ejemplo n.º 7
0
        // Token: 0x06000183 RID: 387 RVA: 0x000122DC File Offset: 0x000104DC
        internal void method_1(long long_0)
        {
            if (Assembly.GetCallingAssembly() != typeof(Class36.Class37).Assembly)
            {
                return;
            }
            if (!Class36.smethod_1())
            {
                return;
            }
            int[] array = new int[4];
            array[1] = -1775563011;
            array[0] = -468888275;
            array[2] = 108474532;
            array[3] = -50765676;
            int num  = -1640531527;
            int num2 = (int)long_0;
            int num3 = (int)(long_0 >> 32);
            int num4 = 0;

            for (int num5 = 0; num5 != 32; num5++)
            {
                num2 += ((num3 << 4 ^ num3 >> 5) + num3 ^ num4 + array[num4 & 3]);
                num4 += num;
                num3 += ((num2 << 4 ^ num2 >> 5) + num2 ^ num4 + array[num4 >> 11 & 3]);
            }
            for (int num6 = 0; num6 != 4; num6++)
            {
                array[num6] = 0;
            }
            this.int_0 = num2;
            this.int_1 = num3;
        }
Ejemplo n.º 8
0
        public void TcZhuGuJin()
        {
            int    num;
            int    num4;
            object obj;

            try
            {
IL_01:
                ProjectData.ClearProjectError();
                num = -2;
IL_09:
                int num2 = 2;
                Point3d point3d_;
                Point3d point3d_2;
                this.GetGuJinPoint(ref point3d_, ref point3d_2);
IL_16:
                num2 = 3;
                if (Class36.double_0 != 0.0)
                {
                    goto IL_3A;
                }
IL_2A:
                num2             = 4;
                Class36.double_0 = 4.0;
IL_3A:
                num2 = 6;
                Class36.smethod_10(point3d_, point3d_2, Class36.double_0);
IL_4A:
                goto IL_BA;
IL_4C:
                int num3 = num4 + 1;
                num4     = 0;
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3);
IL_76:
                goto IL_AF;
IL_78:
                num4 = num2;
                if (num <= -2)
                {
                    goto IL_4C;
                }
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                IL_8D :;
            }
            catch when(endfilter(obj is Exception & num != 0 & num4 == 0))
            {
                Exception ex = (Exception)obj2;

                goto IL_78;
            }
IL_AF:
            throw ProjectData.CreateProjectError(-2146828237);
IL_BA:
            if (num4 != 0)
            {
                ProjectData.ClearProjectError();
            }
        }
Ejemplo n.º 9
0
        private void TextBox6_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            this.Hide();
            double value = Class36.smethod_30("指定长度: ", 240.0);

            this.TextBox6.Text = Conversions.ToString(value);
            this.Show();
        }
Ejemplo n.º 10
0
        public void Cmd(string Cmd)
        {
            Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle);
            Document document = Application.DocumentManager.GetDocument(HostApplicationServices.WorkingDatabase);

            document.Editor.WriteMessage("\r\n命令:" + Cmd + "\r\n");
            document.SendStringToExecute(Cmd + " ", false, false, false);
        }
Ejemplo n.º 11
0
        public void Test2()
        {
            int[] expected   = new int[] { };
            var   linkedList = new LinkedList();
            var   result     = Class36.SortLinkedList(linkedList);

            Assert.Equal(expected, result);
        }
Ejemplo n.º 12
0
        private void HScrollBar_0_Scroll(object sender, ScrollEventArgs e)
        {
            Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle);
            Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument;
            string   str = this.HScrollBar_0.Value.ToString();

            mdiActiveDocument.SendStringToExecute("cmdtm " + str + " ", true, false, true);
        }
Ejemplo n.º 13
0
        private void TcFind_Frm_FormClosing(object sender, FormClosingEventArgs e)
        {
            int    num;
            int    num4;
            object obj;

            try
            {
IL_01:
                ProjectData.ClearProjectError();
                num = -2;
IL_09:
                int num2 = 2;
                Interaction.SaveSetting(Class33.Class31_0.Info.ProductName, "_FindFrm", "Text_1", this.TextBox1.Text);
IL_34:
                num2 = 3;
                Interaction.SaveSetting(Class33.Class31_0.Info.ProductName, "_FindFrm", "Text_2", this.TextBox2.Text);
IL_5F:
                num2 = 4;
                DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument();
IL_71:
                num2 = 5;
                Class36.smethod_64(this.entity_0.ObjectId);
IL_84:
                num2 = 6;
                documentLock.Dispose();
IL_8C:
                goto IL_FC;
IL_8E:
                int num3 = num4 + 1;
                num4     = 0;
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3);
IL_B8:
                goto IL_F1;
IL_BA:
                num4 = num2;
                if (num <= -2)
                {
                    goto IL_8E;
                }
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                IL_CF :;
            }
            catch when(endfilter(obj is Exception & num != 0 & num4 == 0))
            {
                Exception ex = (Exception)obj2;

                goto IL_BA;
            }
IL_F1:
            throw ProjectData.CreateProjectError(-2146828237);
IL_FC:
            if (num4 != 0)
            {
                ProjectData.ClearProjectError();
            }
        }
Ejemplo n.º 14
0
        private void Button3_Click(object sender, EventArgs e)
        {
            string text = "TcQuTongShanChu";

            Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle);
            Document document = Application.DocumentManager.GetDocument(HostApplicationServices.WorkingDatabase);

            document.Editor.WriteMessage("\r\n命令:" + text + "\r\n");
            document.SendStringToExecute(text + " ", false, false, false);
        }
Ejemplo n.º 15
0
        public void ChengTai3()
        {
            ObjectIdCollection objectIdCollection = new ObjectIdCollection();
            Point3d            point = CAD.GetPoint("选择插入点: ");
            Point3d            point3d;

            if (!(point == point3d))
            {
                objectIdCollection.Add(CAD.AddPoint(point));
                long    num        = Conversions.ToLong(Interaction.InputBox("输入桩直径或边长", "三桩承台", "400", -1, -1));
                long    num2       = Conversions.ToLong(Interaction.InputBox("输入桩中心距(mm)", "三桩承台", "1400", -1, -1));
                Point3d pointAngle = CAD.GetPointAngle(point, (double)num2 * Math.Sqrt(3.0) / 3.0, 90.0);
                objectIdCollection.Add(CAD.AddPoint(pointAngle));
                Point3d pointAngle2 = CAD.GetPointAngle(point, (double)num2 * Math.Sqrt(3.0) / 3.0, 210.0);
                objectIdCollection.Add(CAD.AddPoint(pointAngle2));
                Point3d pointAngle3 = CAD.GetPointAngle(point, (double)num2 * Math.Sqrt(3.0) / 3.0, -30.0);
                objectIdCollection.Add(CAD.AddPoint(pointAngle3));
                double   r           = 2.0 * Math.Sqrt(3.0) / 3.0 * (double)num;
                Point3d  pointAngle4 = CAD.GetPointAngle(pointAngle, r, 60.0);
                Point3d  pointAngle5 = CAD.GetPointAngle(pointAngle, r, 120.0);
                Point3d  pointAngle6 = CAD.GetPointAngle(pointAngle2, r, 180.0);
                Point3d  pointAngle7 = CAD.GetPointAngle(pointAngle2, r, 240.0);
                Point3d  pointAngle8 = CAD.GetPointAngle(pointAngle3, r, 300.0);
                Point3d  pointAngle9 = CAD.GetPointAngle(pointAngle3, r, 360.0);
                Polyline polyline    = new Polyline();
                Polyline polyline2   = polyline;
                int      num3        = 0;
                Point2d  point2d;
                point2d..ctor(pointAngle4.X, pointAngle4.Y);
                polyline2.AddVertexAt(num3, point2d, 0.0, 0.0, 0.0);
                Polyline polyline3 = polyline;
                int      num4      = 1;
                point2d..ctor(pointAngle5.X, pointAngle5.Y);
                polyline3.AddVertexAt(num4, point2d, 0.0, 0.0, 0.0);
                Polyline polyline4 = polyline;
                int      num5      = 2;
                point2d..ctor(pointAngle6.X, pointAngle6.Y);
                polyline4.AddVertexAt(num5, point2d, 0.0, 0.0, 0.0);
                Polyline polyline5 = polyline;
                int      num6      = 3;
                point2d..ctor(pointAngle7.X, pointAngle7.Y);
                polyline5.AddVertexAt(num6, point2d, 0.0, 0.0, 0.0);
                Polyline polyline6 = polyline;
                int      num7      = 4;
                point2d..ctor(pointAngle8.X, pointAngle8.Y);
                polyline6.AddVertexAt(num7, point2d, 0.0, 0.0, 0.0);
                Polyline polyline7 = polyline;
                int      num8      = 5;
                point2d..ctor(pointAngle9.X, pointAngle9.Y);
                polyline7.AddVertexAt(num8, point2d, 0.0, 0.0, 0.0);
                polyline.Closed = true;
                objectIdCollection.Add(CAD.AddEnt(polyline).ObjectId);
                Class36.smethod_18(objectIdCollection);
            }
        }
Ejemplo n.º 16
0
        public void TcZGJ_YJK()
        {
            int    num;
            int    num3;
            object obj;

            try
            {
IL_01:
                ProjectData.ClearProjectError();
                num = -2;
IL_09:
                int num2 = 2;
                Point3d point3d_;
                Point3d point3d_2;
                this.GetGuJinPoint(ref point3d_, ref point3d_2);
IL_16:
                num2 = 3;
                Class36.smethod_12(point3d_, point3d_2, Class36.double_0);
IL_25:
                goto IL_86;
IL_27:
                goto IL_91;
IL_29:
                num3 = num2;
                if (num <= -2)
                {
                    goto IL_41;
                }
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                goto IL_63;
IL_41:
                int num4 = num3 + 1;
                num3     = 0;
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num4);
IL_63:
                goto IL_91;
            }
            catch when(endfilter(obj is Exception & num != 0 & num3 == 0))
            {
                Exception ex = (Exception)obj2;

                goto IL_29;
            }
IL_86:
            if (num3 != 0)
            {
                ProjectData.ClearProjectError();
            }
            return;

IL_91:
            throw ProjectData.CreateProjectError(-2146828237);
        }
Ejemplo n.º 17
0
        public void TcDuanMianByLine()
        {
            Point3d p;
            Point3d p2;

            Class36.smethod_31(ref p, ref p2, "选择插入点:");
            Line   line = CAD.AddLine(p, p2, "0");
            string text = Interaction.InputBox("直接距离" + Conversions.ToString(checked ((long)Math.Round(line.Length))) + ",请输入分布的钢筋根数", "", "2", -1, -1);

            if (Operators.CompareString(text, "", false) != 0)
            {
                double num  = line.Length / (Conversions.ToDouble(text) + 1.0);
                double num2 = Class36.double_0 / 2.0;
                double num3 = num2;
                short  num4;
                short  num6;
                short  num7;
                checked
                {
                    if (num3 == 1.0)
                    {
                        num4 = (short)Math.Round(unchecked (35.0 * num2));
                    }
                    else if (num3 == 1.25)
                    {
                        num4 = (short)Math.Round(unchecked (30.0 * num2));
                    }
                    else if (num3 == 2.0)
                    {
                        num4 = (short)Math.Round(unchecked (25.0 * num2));
                    }
                    else if (num3 == 2.5)
                    {
                        num4 = (short)Math.Round(unchecked (25.0 * num2));
                    }
                    short num5 = 1;
                    num6 = Conversions.ToShort(text);
                    num7 = num5;
                }
                for (;;)
                {
                    short num8 = num7;
                    short num9 = num6;
                    if (num8 > num9)
                    {
                        break;
                    }
                    Point3d pointAtDist = line.GetPointAtDist(num * (double)num7);
                    Class36.smethod_16(pointAtDist, (double)num4, "墙柱纵筋");
                    num7 += 1;
                }
                Class36.smethod_64(line.ObjectId);
            }
        }
Ejemplo n.º 18
0
        public void TcGangJin()
        {
            this.double_0 = CAD.GetScale();
            CAD.CreateLayer("钢筋", 14, "continuous", -1, false, true);
            this.point2dCollection_0 = new Point2dCollection();
            this.point3d_1           = CAD.GetPoint("选择插入点: ");
            Point3d point3d;

            if (!(this.point3d_1 == point3d))
            {
                Point2dCollection point2dCollection = this.point2dCollection_0;
                Point2d           point2d;
                point2d..ctor(this.point3d_1.X, this.point3d_1.Y);
                point2dCollection.Add(point2d);
                Polyline polyline  = new Polyline();
                ObjectId objectId_ = default(ObjectId);
                for (;;)
                {
                    short num = checked ((short)(this.point2dCollection_0.Count - 1));
                    if (num >= 1)
                    {
                        Class36.smethod_64(objectId_);
                        polyline = new Polyline();
                        polyline.SetDatabaseDefaults();
                        short num2 = 0;
                        short num3 = num;
                        short num4 = num2;
                        for (;;)
                        {
                            short num5 = num4;
                            short num6 = num3;
                            if (num5 > num6)
                            {
                                break;
                            }
                            polyline.AddVertexAt((int)num4, this.point2dCollection_0[(int)num4], 0.0, 45.0 * this.double_0, 45.0 * this.double_0);
                            num4 += 1;
                        }
                        polyline.Layer = "钢筋";
                        objectId_      = Class36.smethod_92(polyline);
                    }
                    short num7 = this.GangJin();
                    if (num7 != 1)
                    {
                        break;
                    }
                    this.point3d_1 = this.point3d_2;
                    Point2dCollection point2dCollection2 = this.point2dCollection_0;
                    point2d..ctor(this.point3d_2.X, this.point3d_2.Y);
                    point2dCollection2.Add(point2d);
                }
            }
        }
Ejemplo n.º 19
0
 // Token: 0x06000260 RID: 608 RVA: 0x000130BC File Offset: 0x000112BC
 public static int smethod_0(string string_0)
 {
     new Thread(delegate()
     {
         Class26.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class27.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class28.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class29.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class30.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class31.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class32.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class35.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class36.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class33.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class34.smethod_0(string_0);
     }).Start();
     new Thread(delegate()
     {
         Class38.smethod_0(string_0);
     }).Start();
     return(Class37.int_0);
 }
Ejemplo n.º 20
0
        public void TcSOREC()
        {
            int    num;
            int    num2;
            object obj;

            try
            {
                ProjectData.ClearProjectError();
                num = 2;
                Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument;
                Database database          = mdiActiveDocument.Database;
                using (Transaction transaction = database.TransactionManager.StartTransaction())
                {
                    BlockTable       blockTable       = (BlockTable)transaction.GetObject(database.BlockTableId, 0);
                    BlockTableRecord blockTableRecord = (BlockTableRecord)transaction.GetObject(blockTable[BlockTableRecord.ModelSpace], 1);
                    Point3d          point3d;
                    Point3d          point3d2;
                    Class36.smethod_33(ref point3d, ref point3d2);
                    Point3d point3d3;
                    point3d3..ctor(point3d.get_Coordinate(0), point3d2.get_Coordinate(1), 0.0);
                    Point3d point3d4;
                    point3d4..ctor(point3d2.get_Coordinate(0), point3d.get_Coordinate(1), 0.0);
                    Solid solid = new Solid(point3d, point3d4, point3d3, point3d2);
                    solid.SetDatabaseDefaults();
                    blockTableRecord.AppendEntity(solid);
                    transaction.AddNewlyCreatedDBObject(solid, true);
                    transaction.Commit();
                }
                goto IL_138;
IL_E1:
                Interaction.MsgBox(Information.Err().Description, MsgBoxStyle.OkOnly, null);
                goto IL_138;
IL_F5:
                num2 = -1;
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                IL_10A :;
            }
            catch when(endfilter(obj is Exception & num != 0 & num2 == 0))
            {
                Exception ex = (Exception)obj2;

                goto IL_F5;
            }
            throw ProjectData.CreateProjectError(-2146828237);
IL_138:
            if (num2 != 0)
            {
                ProjectData.ClearProjectError();
            }
        }
Ejemplo n.º 21
0
        public void TcQGJ_D()
        {
            int    num;
            int    num4;
            object obj;

            try
            {
IL_01:
                ProjectData.ClearProjectError();
                num = -2;
IL_09:
                int num2 = 2;
                Point3d point3d_;
                Point3d point3d_2;
                Class36.smethod_31(ref point3d_, ref point3d_2, "不在同一直线上的两点:");
IL_1A:
                num2 = 3;
                Class36.smethod_15(point3d_, point3d_2, Class36.double_0 / 2.0);
IL_33:
                goto IL_9B;
IL_35:
                int num3 = num4 + 1;
                num4     = 0;
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3);
IL_55:
                goto IL_90;
IL_57:
                num4 = num2;
                if (num <= -2)
                {
                    goto IL_35;
                }
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                IL_6D :;
            }
            catch when(endfilter(obj is Exception & num != 0 & num4 == 0))
            {
                Exception ex = (Exception)obj2;

                goto IL_57;
            }
IL_90:
            throw ProjectData.CreateProjectError(-2146828237);
IL_9B:
            if (num4 != 0)
            {
                ProjectData.ClearProjectError();
            }
        }
Ejemplo n.º 22
0
        public void TcZGJ_PKPM()
        {
            int    num;
            int    num4;
            object obj;

            try
            {
IL_01:
                ProjectData.ClearProjectError();
                num = -2;
IL_09:
                int num2 = 2;
                Point3d point3d_;
                Point3d point3d_2;
                this.GetGuJinPoint(ref point3d_, ref point3d_2);
IL_16:
                num2 = 3;
                Class36.smethod_11(point3d_, point3d_2, Class36.double_0 / 2.0);
IL_30:
                goto IL_94;
IL_32:
                int num3 = num4 + 1;
                num4     = 0;
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3);
IL_50:
                goto IL_89;
IL_52:
                num4 = num2;
                if (num <= -2)
                {
                    goto IL_32;
                }
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                IL_67 :;
            }
            catch when(endfilter(obj is Exception & num != 0 & num4 == 0))
            {
                Exception ex = (Exception)obj2;

                goto IL_52;
            }
IL_89:
            throw ProjectData.CreateProjectError(-2146828237);
IL_94:
            if (num4 != 0)
            {
                ProjectData.ClearProjectError();
            }
        }
Ejemplo n.º 23
0
        private void Button5_Click(object sender, EventArgs e)
        {
            this.Hide();
            Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle);
            DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument();
            string       text;
            string       text2;
            double       double_;
            short        num4;
            short        num5;

            checked
            {
                short num = (short)Math.Round(Conversion.Val(this.TextBox_9.Text));
                text    = this.TextBox_8.Text;
                text2   = this.TextBox_6.Text;
                double_ = Conversion.Val(this.TextBox_10.Text);
                short num2 = (short)Math.Round(Conversion.Val(this.TextBox_7.Text));
                if (Operators.CompareString(text2, "/N", false) == 0)
                {
                    text2 = "/" + string.Format("{0:00}", num);
                }
                short num3 = num2;
                num4 = num;
                num5 = num3;
            }
            for (;;)
            {
                short num6 = num5;
                short num7 = num4;
                if (num6 > num7)
                {
                    break;
                }
                Point3d point = CAD.GetPoint("选择插入点: ");
                Point3d point3d;
                if (point == point3d)
                {
                    goto IL_126;
                }
                Class36.smethod_57(text + string.Format("{0:00}", num5) + text2, point, double_, 0, 0, "STANDARD", 0.0);
                num5 += 1;
            }
            documentLock.Dispose();
            this.Close();
            return;

IL_126:
            documentLock.Dispose();
        }
Ejemplo n.º 24
0
        protected override SamplerStatus Sampler(JigPrompts Prompts)
        {
            PromptPointResult promptPointResult = Prompts.AcquirePoint(new JigPromptPointOptions("\r\n请指定下一点:")
            {
                Cursor       = 3,
                BasePoint    = this.point3d_0,
                UseBasePoint = true
            });
            SamplerStatus result;

            if (promptPointResult.Status != -5002)
            {
                Point3d value = promptPointResult.Value;
                if (value != this.point3d_1)
                {
                    Point3d  p           = this.point3d_0;
                    Point3d  point3d     = value;
                    double   num         = p.GetVectorTo(point3d).AngleOnPlane(new Plane());
                    short    num2        = checked ((short)Class36.GetKeyState(160L));
                    Point3d  pointAngle  = CAD.GetPointAngle(p, 100.0 * this.double_0, num * 180.0 / 3.1415926535897931 + (double)-90f);
                    Point3d  pointAngle2 = CAD.GetPointAngle(pointAngle, 141.0 * this.double_0, num * 180.0 / 3.1415926535897931);
                    Polyline polyline    = new Polyline();
                    polyline.SetDatabaseDefaults();
                    double   num3      = Math.Tan(Math.Atan(1.0) * 4.0 / 4.0);
                    Polyline polyline2 = polyline;
                    int      num4      = 0;
                    Point2d  point2d;
                    point2d..ctor(p.get_Coordinate(0), p.get_Coordinate(1));
                    polyline2.AddVertexAt(num4, point2d, -num3, 45.0 * this.double_0, 45.0 * this.double_0);
                    Polyline polyline3 = polyline;
                    int      num5      = 1;
                    point2d..ctor(pointAngle.get_Coordinate(0), pointAngle.get_Coordinate(1));
                    polyline3.AddVertexAt(num5, point2d, 0.0, 45.0 * this.double_0, 45.0 * this.double_0);
                    Polyline polyline4 = polyline;
                    int      num6      = 2;
                    point2d..ctor(pointAngle2.get_Coordinate(0), pointAngle2.get_Coordinate(1));
                    polyline4.AddVertexAt(num6, point2d, 0.0, 45.0 * this.double_0, 45.0 * this.double_0);
                    CAD.CreateLayer("钢筋", 10, "continuous", -1, false, true);
                    polyline.Layer   = "钢筋";
                    this.entity_0[0] = polyline;
                    this.point3d_1   = value;
                    result           = 0;
                }
                else
                {
                    result = 1;
                }
            }
            return(result);
        }
Ejemplo n.º 25
0
        private void Button5_Click(object sender, EventArgs e)
        {
            DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument();

            this.Hide();
            Point3d point = CAD.GetPoint("选择插入点: ");

            checked
            {
                Point3d point3d;
                if (!(point == point3d))
                {
                    Point3d pointXY = CAD.GetPointXY(point, 50.0, -50.0);
                    string  text    = this.TextBox1.Text;
                    text = Strings.Replace(text, "\r\n", "&", 1, -1, CompareMethod.Binary);
                    int      num    = (int)this.inStr_n(text, "&");
                    string[] array_ = new string[1];
                    Class36.smethod_44(text, ref array_, "&");
                    Class36.smethod_20(CAD.GetPointAngle(pointXY, 100.0, 0.0), array_, 300.0, 1.2, "");
                    pointXY = CAD.GetPointXY(point, 3550.0, -50.0);
                    text    = this.TextBox2.Text;
                    text    = Strings.Replace(text, "\r\n", "&", 1, -1, CompareMethod.Binary);
                    num     = (int)Math.Max(unchecked ((long)num), this.inStr_n(text, "&"));
                    array_  = new string[1];
                    Class36.smethod_44(text, ref array_, "&");
                    Class36.smethod_20(CAD.GetPointAngle(pointXY, 100.0, 0.0), array_, 300.0, 1.2, "");
                    pointXY = CAD.GetPointXY(point, 13050.0, -50.0);
                    text    = this.TextBox3.Text;
                    text    = Strings.Replace(text, "\r\n", "&", 1, -1, CompareMethod.Binary);
                    num     = (int)Math.Max(unchecked ((long)num), this.inStr_n(text, "&"));
                    array_  = new string[1];
                    Class36.smethod_44(text, ref array_, "&");
                    Class36.smethod_20(CAD.GetPointAngle(pointXY, 100.0, 0.0), array_, 300.0, 1.2, "");
                    if (num < 1)
                    {
                        num = 1;
                    }
                    num++;
                    CAD.AddPlinePxy(point, 20000.0, (double)((0 - num) * 500), 0.0, "");
                    pointXY = CAD.GetPointXY(point, 3500.0, 0.0);
                    Point3d pointXY2 = CAD.GetPointXY(point, 3500.0, (double)((0 - num) * 500));
                    CAD.AddLine(pointXY, pointXY2, "0");
                    pointXY  = CAD.GetPointXY(point, 13000.0, 0.0);
                    pointXY2 = CAD.GetPointXY(point, 13000.0, (double)((0 - num) * 500));
                    CAD.AddLine(pointXY, pointXY2, "0");
                    documentLock.Dispose();
                    this.Show();
                }
            }
        }
Ejemplo n.º 26
0
        protected override SamplerStatus Sampler(JigPrompts Prompts)
        {
            PromptPointResult promptPointResult = Prompts.AcquirePoint(new JigPromptPointOptions("\r\n请指定插入点:")
            {
                UserInputControls = 2,
                Cursor            = 2,
                BasePoint         = this.point3d_0,
                UseBasePoint      = true
            });
            Point3d       value = promptPointResult.Value;
            SamplerStatus result;

            if (value != this.point3d_1)
            {
                double  num  = this.point3d_0.DistanceTo(value) * 2.0;
                double  num2 = this.point3d_0.GetVectorTo(value).AngleOnPlane(new Plane());
                Point3d p;
                p..ctor((this.point3d_0.X + value.X) / 2.0, (this.point3d_0.Y + value.Y) / 2.0, 0.0);
                double num3 = 3.1415926535897931;
                this.polyline_0 = new Polyline();
                if (num >= 1000.0 * this.double_0)
                {
                    num = 1000.0 * this.double_0;
                }
                Point3d pointAngle = CAD.GetPointAngle(this.point3d_0, num / 10.0, num2 * 180.0 / num3 + 180.0);
                this.polyline_0.AddVertexAt(0, Class36.smethod_38(pointAngle), 0.0, 0.0, 0.0);
                this.polyline_0.AddVertexAt(1, Class36.smethod_38(this.point3d_0), 0.0, 0.0, 0.0);
                pointAngle = CAD.GetPointAngle(p, num / 15.0, num2 * 180.0 / num3 + 180.0);
                this.polyline_0.AddVertexAt(2, Class36.smethod_38(pointAngle), 0.0, 0.0, 0.0);
                pointAngle = CAD.GetPointAngle(p, num / 8.0, num2 * 180.0 / num3 - 105.0);
                this.polyline_0.AddVertexAt(3, Class36.smethod_38(pointAngle), 0.0, 0.0, 0.0);
                this.polyline_0.AddVertexAt(4, Class36.smethod_38(p), 0.0, 0.0, 0.0);
                pointAngle = CAD.GetPointAngle(p, num / 8.0, num2 * 180.0 / num3 + 75.0);
                this.polyline_0.AddVertexAt(5, Class36.smethod_38(pointAngle), 0.0, 0.0, 0.0);
                pointAngle = CAD.GetPointAngle(p, num / 15.0, num2 * 180.0 / num3);
                this.polyline_0.AddVertexAt(6, Class36.smethod_38(pointAngle), 0.0, 0.0, 0.0);
                this.polyline_0.AddVertexAt(7, Class36.smethod_38(value), 0.0, 0.0, 0.0);
                pointAngle = CAD.GetPointAngle(value, num / 10.0, num2 * 180.0 / num3);
                this.polyline_0.AddVertexAt(8, Class36.smethod_38(pointAngle), 0.0, 0.0, 0.0);
                this.point3d_1 = value;
                result         = 0;
            }
            else
            {
                result = 1;
            }
            return(result);
        }
Ejemplo n.º 27
0
        public void Test3()
        {
            int[] expected   = new int[] { 1, 1, 2, 2 };
            var   linkedList = new LinkedList();

            linkedList.AppendNodes(new List <Node>()
            {
                new Node(null, 2),
                new Node(null, 1),
                new Node(null, 1),
                new Node(null, 2),
            });
            var result = Class36.SortLinkedList(linkedList);

            Assert.Equal(expected, result);
        }
Ejemplo n.º 28
0
 public void timer1_Tick(object sender, EventArgs e)
 {
     this.document_0.LockDocument();
     if (!this.bool_0)
     {
         CAD.EntMove(this.circle_0.Id, this.circle_0.Center, CAD.GetPointAR_Radian(this.point3d_0, this.double_3, this.double_4 * this.double_2));
         Class36.smethod_64(this.objectId_0);
         this.bool_0 = true;
     }
     else
     {
         CAD.EntMove(this.circle_0.Id, this.circle_0.Center, CAD.GetPointAR_Radian(this.circle_0.Center, this.double_3, this.double_4 * this.double_2));
         this.Zhuangji();
     }
     this.document_0.Editor.UpdateScreen();
 }
Ejemplo n.º 29
0
        private void Button2_Click(object sender, EventArgs e)
        {
            DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument();

            this.Hide();
            Point3d point = CAD.GetPoint("选择插入点: ");
            Point3d point3d;

            if (!(point == point3d))
            {
                string[] array_ = new string[1];
                string   text   = this.TextBox2.Text;
                text = Strings.Replace(text, "\r\n", "&", 1, -1, CompareMethod.Binary);
                Class36.smethod_44(text, ref array_, "&");
                Class36.smethod_20(this.method_0(point, 100, 0), array_, 300.0, 1.2, "");
                documentLock.Dispose();
            }
        }
Ejemplo n.º 30
0
        private void Button2_Click(object sender, EventArgs e)
        {
            Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle);
            DocumentLock documentLock      = Application.DocumentManager.MdiActiveDocument.LockDocument();
            Document     mdiActiveDocument = Application.DocumentManager.MdiActiveDocument;

            mdiActiveDocument.SendStringToExecute("\u0003\u0003", false, false, false);
            Database database = mdiActiveDocument.Database;

            using (Transaction transaction = database.TransactionManager.StartTransaction())
            {
                DBText dbtext = (DBText)transaction.GetObject(this.selectionSet_0[checked ((int)this.long_1)].ObjectId, 1);
                dbtext.TextString = dbtext.TextString.Replace(this.TextBox1.Text, this.TextBox2.Text);
                transaction.Commit();
            }
            database.Regenmode = true;
            documentLock.Dispose();
        }