示例#1
0
        internal override void Read(Class434 or, Class259 objectBuilder)
        {
            base.Read(or, objectBuilder);
            Interface30 objectBitStream = or.ObjectBitStream;

            if (or.Builder.Version > DxfVersion.Dxf21)
            {
                this.short_0 = objectBitStream.imethod_14();
            }
            this.contentType_0      = (MLeader.ContentType)objectBitStream.imethod_14();
            this.drawMLeaderOrder_0 = (MLeader.DrawMLeaderOrder)objectBitStream.imethod_14();
            this.drawLeaderOrder_0  = (MLeader.DrawLeaderOrder)objectBitStream.imethod_14();
            this.int_0        = objectBitStream.imethod_11();
            this.double_0     = objectBitStream.imethod_8();
            this.double_1     = objectBitStream.imethod_8();
            this.leaderType_0 = (MLeader.LeaderType)objectBitStream.imethod_14();
            this.color_0      = objectBitStream.imethod_22();
            or.method_78((System.Action <DxfObjectReference>)(o => this.dxfObjectReference_3 = o));
            this.int_1    = objectBitStream.imethod_11();
            this.bool_0   = objectBitStream.imethod_6();
            this.double_2 = objectBitStream.imethod_8();
            this.bool_1   = objectBitStream.imethod_6();
            this.double_3 = objectBitStream.imethod_8();
            this.string_0 = objectBitStream.ReadString();
            or.method_78((System.Action <DxfObjectReference>)(o => this.dxfObjectReference_4 = o));
            this.double_4 = objectBitStream.imethod_8();
            this.string_1 = objectBitStream.ReadString();
            or.method_78((System.Action <DxfObjectReference>)(o => this.dxfObjectReference_5 = o));
            this.textAttachment_0 = (MLeader.TextAttachment)objectBitStream.imethod_14();
            this.textAttachment_1 = (MLeader.TextAttachment)objectBitStream.imethod_14();
            this.textAngleType_0  = (MLeader.TextAngleType)objectBitStream.imethod_14();
            this.textAlignment_0  = (MLeader.TextAlignment)objectBitStream.imethod_14();
            this.color_1          = objectBitStream.imethod_22();
            this.double_5         = objectBitStream.imethod_8();
            this.bool_2           = objectBitStream.imethod_6();
            this.bool_3           = objectBitStream.imethod_6();
            this.double_6         = objectBitStream.imethod_8();
            or.method_78((System.Action <DxfObjectReference>)(o => this.dxfObjectReference_6 = o));
            this.color_2               = objectBitStream.imethod_22();
            this.vector3D_0            = objectBitStream.imethod_51();
            this.bool_4                = objectBitStream.imethod_6();
            this.double_7              = objectBitStream.imethod_8();
            this.bool_5                = objectBitStream.imethod_6();
            this.blockConnectionType_0 = (MLeader.BlockConnectionType)objectBitStream.imethod_14();
            this.double_8              = objectBitStream.imethod_8();
            this.bool_7                = objectBitStream.imethod_6();
            this.bool_6                = objectBitStream.imethod_6();
            this.double_9              = objectBitStream.imethod_8();
            if (or.Builder.Version > DxfVersion.Dxf21)
            {
                this.textAttachmentDirection_0 = (MLeader.TextAttachmentDirection)objectBitStream.imethod_14();
                this.textAttachment_3          = (MLeader.TextAttachment)objectBitStream.imethod_14();
                this.textAttachment_2          = (MLeader.TextAttachment)objectBitStream.imethod_14();
            }
            if (or.Builder.Version <= DxfVersion.Dxf24)
            {
                return;
            }
            this.bool_8 = objectBitStream.imethod_6();
        }
        internal override void Read(Class434 or, Class259 ob)
        {
            base.Read(or, ob);
            Interface30 objectBitStream = or.ObjectBitStream;

            this.Name        = objectBitStream.ReadString();
            this.Description = objectBitStream.ReadString();
            this.Value       = objectBitStream.imethod_8();
            this.dxfBlockParametersValueSet_0 = or.method_5();
        }
        internal override void Read(Class434 or, Class259 ob)
        {
            base.Read(or, ob);
            Interface30 objectBitStream = or.ObjectBitStream;

            this.BasePointAngular             = objectBitStream.imethod_39();
            this.TextPosition                 = objectBitStream.imethod_39();
            this.Name                         = objectBitStream.ReadString();
            this.Description                  = objectBitStream.ReadString();
            this.Value                        = objectBitStream.imethod_8();
            this.Unknown1                     = objectBitStream.imethod_6();
            this.dxfBlockParametersValueSet_0 = or.method_5();
        }
示例#4
0
        public override Color imethod_25(Interface30 stringReader)
        {
            int    num1 = (int)this.imethod_14();
            int    num2 = this.imethod_11();
            byte   num3 = this.imethod_18();
            string name = string.Empty;

            if (((int)num3 & 1) == 1)
            {
                name = stringReader.ReadString();
            }
            string colorBookName = string.Empty;

            if (((int)num3 & 2) == 2)
            {
                colorBookName = stringReader.ReadString();
            }
            Color color;

            switch ((byte)(num2 >> 24))
            {
            case 192:
                color = Color.ByLayer;
                break;

            case 193:
                color = Color.ByBlock;
                break;

            case 194:
                color = Color.smethod_1((uint)num2, colorBookName, name);
                break;

            case 195:
                color = Color.CreateFromColorIndex((short)(num2 & (int)ushort.MaxValue));
                break;

            default:
                color = Color.smethod_1((uint)num2, colorBookName, name);
                break;
            }
            return(color);
        }
示例#5
0
        internal override void Read(Class434 or, Class259 objectBuilder)
        {
            base.Read(or, objectBuilder);
            Interface30 objectBitStream = or.ObjectBitStream;
            int         num1;

            if (or.Builder.Version > DxfVersion.Dxf14)
            {
                num1 = objectBitStream.imethod_11();
                if (or.Builder.Version > DxfVersion.Dxf15)
                {
                    objectBitStream.ReadString();
                }
                int num2 = objectBitStream.imethod_11();
                this.dwgVersion_0 = (DwgVersion)(num2 & (int)ushort.MaxValue);
                this.short_1      = (short)(num2 >> 16);
                this.bool_2       = objectBitStream.imethod_6();
                if (this.bool_2)
                {
                    objectBitStream.imethod_11();
                    objectBitStream.imethod_11();
                }
            }
            else
            {
                num1 = objectBitStream.imethod_11();
                objectBitStream.imethod_11();
            }
            this.dxfClass_0 = or.Builder.Model.Classes.GetClassWithClassNumber((short)num1);
            Class1048 class1048 = (Class1048)objectBitStream;

            this.stream_0 = (Stream) new PagedMemoryStream(1024L, 1024);
            this.long_0   = (long)class1048.MainReader.imethod_21((PagedMemoryStream)this.stream_0);
            Class444.Create(or.Builder.Version, this.stream_0);
            if (class1048.StringReader != class1048.MainReader)
            {
                this.stream_1 = (Stream) new PagedMemoryStream(1024L, 1024);
                this.uint_0   = class1048.StringReader.imethod_21((PagedMemoryStream)this.stream_1);
            }
            else
            {
                this.method_13(or.Builder.Version);
            }
            while (class1048.HandleReader.Stream.Position < class1048.HandleReader.Stream.Length)
            {
                ReferenceType           referenceType;
                ulong                   handle = class1048.HandleReader.imethod_34(0UL, true, out referenceType);
                DxfTypedObjectReference typedObjectReference = new DxfTypedObjectReference(referenceType);
                this.list_0.Add(typedObjectReference);
                objectBuilder.ChildBuilders.Add((Interface10)typedObjectReference.method_0(handle));
            }
        }
示例#6
0
        internal override void Read(Class434 or, Class259 ob)
        {
            base.Read(or, ob);
            Interface30 objectBitStream = or.ObjectBitStream;

            this.bool_0   = objectBitStream.imethod_14() == (short)1;
            this.string_0 = objectBitStream.ReadString();
            if (this.string_0 == "")
            {
                throw new DxfException("Invalid scale name");
            }
            this.double_0 = objectBitStream.imethod_8();
            this.double_1 = objectBitStream.imethod_8();
            this.bool_1   = objectBitStream.imethod_6();
        }
示例#7
0
        internal override void Read(Class434 or, Class259 builder)
        {
            base.Read(or, builder);
            Interface30 objectBitStream = or.ObjectBitStream;

            this.short_0     = objectBitStream.imethod_14();
            this.ColumnCount = objectBitStream.imethod_11();
            this.RowCount    = objectBitStream.imethod_11();
            this.string_0    = objectBitStream.ReadString();
            int num = 0;

            foreach (DxfDataColumn dxfDataColumn in (ActiveList <DxfDataColumn>) this.dxfDataColumnCollection_0)
            {
                dxfDataColumn.Read(objectBitStream, (DxfDataTable.Class273)builder, num++);
            }
        }
示例#8
0
文件: DxfGeoData.cs 项目: 15831944/WW
        internal override void Read(Class434 or, Class259 ob)
        {
            base.Read(or, ob);
            Interface30 objectBitStream = or.ObjectBitStream;

            this.int_0 = objectBitStream.imethod_11();
            or.Builder.method_10(objectBitStream.imethod_32(true), (System.Action <DxfObjectReference>)(o => this.dxfObjectReference_3 = o));
            this.designCoordinatesType_0 = (DesignCoordinatesType)objectBitStream.imethod_14();
            switch (this.int_0)
            {
            case 1:
                this.point3D_1    = objectBitStream.imethod_39();
                this.unitsValue_0 = (UnitsValue)objectBitStream.imethod_11();
                this.unitsValue_1 = this.unitsValue_0;
                this.point3D_0    = objectBitStream.imethod_39();
                objectBitStream.imethod_39();
                this.vector3D_0 = objectBitStream.imethod_51();
                this.vector2D_0 = Vector2D.FromAngle(System.Math.PI / 2.0 - objectBitStream.imethod_8());
                objectBitStream.imethod_39();
                this.string_0     = objectBitStream.ReadString();
                this.string_1     = objectBitStream.ReadString();
                this.vector2D_1.X = objectBitStream.imethod_8();
                this.vector2D_1.Y = this.vector2D_1.X;
                objectBitStream.ReadString();
                objectBitStream.ReadString();
                break;

            case 2:
            case 3:
                this.point3D_0               = objectBitStream.imethod_39();
                this.point3D_1               = objectBitStream.imethod_39();
                this.vector2D_1.X            = objectBitStream.imethod_8();
                this.unitsValue_0            = (UnitsValue)objectBitStream.imethod_11();
                this.vector2D_1.Y            = objectBitStream.imethod_8();
                this.unitsValue_1            = (UnitsValue)objectBitStream.imethod_11();
                this.vector3D_0              = objectBitStream.imethod_51();
                this.vector2D_0              = objectBitStream.imethod_50();
                this.scaleEstimationMethod_0 = (ScaleEstimationMethod)objectBitStream.imethod_11();
                this.double_0 = objectBitStream.imethod_8();
                this.bool_0   = objectBitStream.imethod_6();
                this.double_1 = objectBitStream.imethod_8();
                this.double_2 = objectBitStream.imethod_8();
                this.string_0 = objectBitStream.ReadString();
                this.string_1 = objectBitStream.ReadString();
                break;
            }
            this.string_2 = objectBitStream.ReadString();
            this.string_3 = objectBitStream.ReadString();
            this.string_4 = objectBitStream.ReadString();
            int num1 = objectBitStream.imethod_11();

            for (int index = 0; index < num1; ++index)
            {
                this.list_0.Add(new GeoMeshPoint(objectBitStream.imethod_38(), objectBitStream.imethod_38()));
            }
            int num2 = objectBitStream.imethod_11();

            for (int index = 0; index < num2; ++index)
            {
                this.list_1.Add(new GeoMeshFace(objectBitStream.imethod_11(), objectBitStream.imethod_11(), objectBitStream.imethod_11()));
            }
            if (this.int_0 != 1 || !objectBitStream.imethod_6())
            {
                return;
            }
            objectBitStream.imethod_6();
            objectBitStream.imethod_38();
            objectBitStream.imethod_38();
            objectBitStream.imethod_11();
            objectBitStream.imethod_11();
            objectBitStream.imethod_38();
            objectBitStream.imethod_38();
            objectBitStream.imethod_6();
            objectBitStream.imethod_8();
            objectBitStream.imethod_8();
            this.scaleEstimationMethod_0 = (ScaleEstimationMethod)objectBitStream.imethod_11();
            this.double_0 = objectBitStream.imethod_8();
            this.bool_0   = objectBitStream.imethod_6();
            this.double_1 = objectBitStream.imethod_8();
            this.double_2 = objectBitStream.imethod_8();
        }
示例#9
0
        internal void Read(Interface30 r, DxfDataTable.Class273 tableBuilder, int columnIndex)
        {
            this.dataCellType_0 = (DataCellType)r.imethod_11();
            this.string_0       = r.ReadString();
            foreach (DxfDataCell dxfDataCell in this.list_0)
            {
                switch (this.dataCellType_0)
                {
                case DataCellType.Unknown:
                    dxfDataCell.Value = (DxfDataCellValue)DxfDataCellValue.Unknown.Instance;
                    continue;

                case DataCellType.Int32:
                    dxfDataCell.Value = (DxfDataCellValue) new DxfDataCellValue.Int32(r.imethod_11());
                    continue;

                case DataCellType.Double:
                    dxfDataCell.Value = (DxfDataCellValue) new DxfDataCellValue.Double(r.imethod_8());
                    continue;

                case DataCellType.String:
                    dxfDataCell.Value = (DxfDataCellValue) new DxfDataCellValue.String(r.ReadString());
                    continue;

                case DataCellType.Point3D:
                    dxfDataCell.Value = (DxfDataCellValue) new DxfDataCellValue.Point3D(r.imethod_39());
                    continue;

                case DataCellType.ObjectId:
                    DxfDataCellValue.ObjectIdBase o1 = (DxfDataCellValue.ObjectIdBase) new DxfDataCellValue.ObjectId();
                    tableBuilder.Add((Interface10) new DxfDataCellValue.ObjectIdBase.Class554(o1, r.imethod_32(true)));
                    dxfDataCell.Value = (DxfDataCellValue)o1;
                    continue;

                case DataCellType.HardOwnerId:
                    DxfDataCellValue.OwnerIdBase o2 = (DxfDataCellValue.OwnerIdBase) new DxfDataCellValue.HardOwnerId();
                    tableBuilder.Add((Interface10) new DxfDataCellValue.OwnerIdBase.Class555(o2, r.imethod_32(true)));
                    dxfDataCell.Value = (DxfDataCellValue)o2;
                    continue;

                case DataCellType.SoftOwnerId:
                    DxfDataCellValue.OwnerIdBase o3 = (DxfDataCellValue.OwnerIdBase) new DxfDataCellValue.SoftOwnerId();
                    tableBuilder.Add((Interface10) new DxfDataCellValue.OwnerIdBase.Class555(o3, r.imethod_32(true)));
                    dxfDataCell.Value = (DxfDataCellValue)o3;
                    continue;

                case DataCellType.HardPointerId:
                    DxfDataCellValue.ObjectIdBase o4 = (DxfDataCellValue.ObjectIdBase) new DxfDataCellValue.HardPointerId();
                    tableBuilder.Add((Interface10) new DxfDataCellValue.ObjectIdBase.Class554(o4, r.imethod_32(true)));
                    dxfDataCell.Value = (DxfDataCellValue)o4;
                    continue;

                case DataCellType.SoftPointerId:
                    DxfDataCellValue.ObjectIdBase o5 = (DxfDataCellValue.ObjectIdBase) new DxfDataCellValue.SoftPointerId();
                    tableBuilder.Add((Interface10) new DxfDataCellValue.ObjectIdBase.Class554(o5, r.imethod_32(true)));
                    dxfDataCell.Value = (DxfDataCellValue)o5;
                    continue;

                case DataCellType.Bool:
                    dxfDataCell.Value = (DxfDataCellValue) new DxfDataCellValue.Bool(r.imethod_6());
                    continue;

                case DataCellType.Vector3D:
                    dxfDataCell.Value = (DxfDataCellValue) new DxfDataCellValue.Vector3D(r.imethod_51());
                    continue;

                default:
                    throw new Exception("DataCellType " + (object)this.dataCellType_0 + " is not supported.");
                }
            }
        }