예제 #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();
        }
예제 #2
0
파일: Class551.cs 프로젝트: 15831944/WW
        public void CopyFrom(Class551 from, CloneContext cloneContext)
        {
            this.bool_0     = true;
            this.vector3D_0 = from.vector3D_0;
            this.TableStyle = from.TableStyle != null?Class906.smethod_4(cloneContext, from.TableStyle) : (DxfTableStyle)null;

            this.nullable_0 = from.nullable_0;
            this.nullable_1 = from.nullable_1;
            this.nullable_2 = from.nullable_2;
            this.nullable_3 = from.nullable_3;
            this.nullable_4 = from.nullable_4;
            this.class984_0.CopyFrom(from.class984_0, cloneContext);
            this.class984_1.CopyFrom(from.class984_1, cloneContext);
            this.class984_2.CopyFrom(from.class984_2, cloneContext);
            this.dxfTableBorderOverrides_0.CopyFrom(from.dxfTableBorderOverrides_0, cloneContext);
            this.dxfTableBorderOverrides_1.CopyFrom(from.dxfTableBorderOverrides_1, cloneContext);
            this.dxfTableBorderOverrides_2.CopyFrom(from.dxfTableBorderOverrides_2, cloneContext);
            this.dxfTableBorderOverrides_3.CopyFrom(from.dxfTableBorderOverrides_3, cloneContext);
            this.dxfTableBorderOverrides_4.CopyFrom(from.dxfTableBorderOverrides_4, cloneContext);
            this.dxfTableBorderOverrides_5.CopyFrom(from.dxfTableBorderOverrides_5, cloneContext);
            this.int_0 = from.int_0;
            foreach (Class430 class430 in (ActiveList <Class430>)from.class429_0)
            {
                this.class429_0.Add(class430.Clone(cloneContext));
            }
            foreach (Class736 column in (ActiveList <Class736>)from.Columns)
            {
                this.class912_0.Add(column.Clone(cloneContext));
            }
            this.bool_0 = false;
        }
예제 #3
0
 public DxfBlockReferenceObjectContextData(DxfInsertBase insert, DxfScale scale)
     : base(scale)
 {
     this.vector3D_0 = insert.ScaleFactor;
     this.point3D_0  = insert.InsertionPoint;
     this.Rotation   = insert.Rotation;
 }
예제 #4
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfToleranceObjectContextData objectContextData = (DxfToleranceObjectContextData)from;

            this.point3D_0  = objectContextData.InsertionPoint;
            this.vector3D_0 = objectContextData.XAxis;
        }
예제 #5
0
        internal override void Read(Class434 or, Class259 ob)
        {
            base.Read(or, ob);
            Interface30 objectBitStream = or.ObjectBitStream;

            this.point3D_0  = objectBitStream.imethod_39();
            this.vector3D_0 = objectBitStream.imethod_51();
        }
예제 #6
0
 public DxfLeaderObjectContextData(DxfLeader leader, DxfScale scale)
     : base(scale)
 {
     this.list_0              = new List <WW.Math.Point3D>((IEnumerable <WW.Math.Point3D>)leader.Vertices);
     this.vector3D_0          = leader.LastVertexOffsetFromBlock;
     this.vector3D_1          = leader.LastVertexOffsetFromAnnotation;
     this.vector3D_2          = leader.HorizontalDirection;
     this.hookLineDirection_0 = leader.HookLineDirection;
 }
예제 #7
0
        internal override void Read(Class434 or, Class259 ob)
        {
            base.Read(or, ob);
            Interface30 objectBitStream = or.ObjectBitStream;

            ((DxfHatchViewContextData.Class312)ob).ViewportHandle = or.method_100();
            this.vector3D_1 = objectBitStream.imethod_51();
            this.double_1   = objectBitStream.imethod_8();
            this.bool_1     = objectBitStream.imethod_6();
        }
예제 #8
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfHatchViewContextData hatchViewContextData = (DxfHatchViewContextData)from;

            this.dxfObjectReference_4 = hatchViewContextData.dxfObjectReference_4;
            this.vector3D_1           = hatchViewContextData.vector3D_1;
            this.double_1             = hatchViewContextData.double_1;
            this.bool_1 = hatchViewContextData.bool_1;
        }
예제 #9
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfLeaderObjectContextData objectContextData = (DxfLeaderObjectContextData)from;

            this.list_0              = new List <WW.Math.Point3D>((IEnumerable <WW.Math.Point3D>)objectContextData.Vertices);
            this.vector3D_0          = objectContextData.LastVertexOffsetFromBlock;
            this.vector3D_1          = objectContextData.LastVertexOffsetFromAnnotation;
            this.vector3D_2          = objectContextData.HorizontalDirection;
            this.hookLineDirection_0 = objectContextData.HookLineDirection;
        }
예제 #10
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfHatchScaleContextData scaleContextData = (DxfHatchScaleContextData)from;

            foreach (DxfHatch.BoundaryPath boundaryPath in scaleContextData.list_0)
            {
                this.list_0.Add(boundaryPath.Clone(cloneContext));
            }
            this.dxfPattern_0 = scaleContextData.dxfPattern_0 == null ? (DxfPattern)null : scaleContextData.dxfPattern_0.Clone();
            this.double_0     = scaleContextData.double_0;
            this.vector3D_0   = scaleContextData.vector3D_0;
        }
예제 #11
0
        internal override void Read(Class434 or, Class259 ob)
        {
            base.Read(or, ob);
            Interface30 objectBitStream = or.ObjectBitStream;
            int         num             = (int)objectBitStream.imethod_14();

            this.list_0.Clear();
            for (int index = 0; index < num; ++index)
            {
                this.list_0.Add(objectBitStream.imethod_39());
            }
            this.vector3D_2          = objectBitStream.imethod_51();
            this.hookLineDirection_0 = objectBitStream.imethod_6() ? HookLineDirection.Same : HookLineDirection.Opposite;
            this.vector3D_0          = objectBitStream.imethod_51();
            this.vector3D_1          = objectBitStream.imethod_51();
        }
예제 #12
0
 private void method_8(CloneContext context, DxfMLeaderStyle from)
 {
     this.contentType_0      = from.contentType_0;
     this.drawMLeaderOrder_0 = from.drawMLeaderOrder_0;
     this.drawLeaderOrder_0  = from.drawLeaderOrder_0;
     this.int_0                     = from.int_0;
     this.double_0                  = from.double_0;
     this.double_1                  = from.double_1;
     this.leaderType_0              = from.leaderType_0;
     this.color_0                   = from.color_0;
     this.LineType                  = Class906.GetLineType(context, from.LineType);
     this.int_1                     = from.int_1;
     this.bool_0                    = from.bool_0;
     this.double_2                  = from.double_2;
     this.bool_1                    = from.bool_1;
     this.double_3                  = from.double_3;
     this.string_0                  = from.string_0;
     this.ArrowHeadBlock            = Class906.smethod_0(context, from.ArrowHeadBlock, false);
     this.double_4                  = from.double_4;
     this.string_1                  = from.string_1;
     this.TextStyle                 = Class906.GetTextStyle(context, from.TextStyle);
     this.textAttachment_0          = from.textAttachment_0;
     this.textAngleType_0           = from.textAngleType_0;
     this.textAlignment_0           = from.textAlignment_0;
     this.textAttachment_1          = from.textAttachment_1;
     this.color_1                   = from.color_1;
     this.double_5                  = from.double_5;
     this.bool_2                    = from.bool_2;
     this.bool_3                    = from.bool_3;
     this.double_6                  = from.double_6;
     this.Block                     = Class906.smethod_0(context, from.Block, false);
     this.color_2                   = from.color_2;
     this.vector3D_0                = from.vector3D_0;
     this.bool_4                    = from.bool_4;
     this.double_7                  = from.double_7;
     this.bool_5                    = from.bool_5;
     this.blockConnectionType_0     = from.blockConnectionType_0;
     this.double_8                  = from.double_8;
     this.bool_6                    = from.bool_6;
     this.bool_7                    = from.bool_7;
     this.double_9                  = from.double_9;
     this.textAttachmentDirection_0 = from.textAttachmentDirection_0;
     this.textAttachment_2          = from.textAttachment_2;
     this.textAttachment_3          = from.textAttachment_3;
     this.bool_8                    = from.bool_8;
 }
예제 #13
0
        internal override void Read(Class434 or, Class259 ob)
        {
            base.Read(or, ob);
            Interface30 objectBitStream = or.ObjectBitStream;

            this.dxfPattern_0 = new DxfPattern();
            this.dxfPattern_0.Read(objectBitStream);
            this.double_0   = objectBitStream.imethod_8();
            this.vector3D_0 = objectBitStream.imethod_51();
            int num = objectBitStream.imethod_11();

            for (int index = 0; index < num; ++index)
            {
                DxfHatch.BoundaryPath boundaryPath = new DxfHatch.BoundaryPath();
                boundaryPath.Read(or, false);
                this.list_0.Add(boundaryPath);
            }
        }
예제 #14
0
        internal bool method_5(DxfHandledObject sourceObject, string fieldName, ref WW.Math.Vector3D scale)
        {
            bool   flag = false;
            string str  = (string)null;

            if (DxfModelRepairer.smethod_0(scale.X) || scale.X == 0.0)
            {
                scale.X = 1.0;
                flag    = true;
                str     = "X";
            }
            if (DxfModelRepairer.smethod_0(scale.Y) || scale.Y == 0.0)
            {
                scale.Y = 1.0;
                flag    = true;
                str     = !string.IsNullOrEmpty(str) ? str + ", Y" : "Y";
            }
            if (DxfModelRepairer.smethod_0(scale.Z) || scale.Z == 0.0)
            {
                scale.Z = 1.0;
                flag    = true;
                str     = !string.IsNullOrEmpty(str) ? str + " and Z" : "Z";
            }
            if (flag)
            {
                this.ilist_0.Add(new DxfMessage(DxfStatus.InvalidScale, Severity.Warning, "FieldName", (object)fieldName)
                {
                    Parameters =
                    {
                        {
                            "Object",
                            (object)sourceObject
                        },
                        {
                            "InvalidCoordinates",
                            (object)str
                        }
                    }
                });
            }
            return(flag);
        }
예제 #15
0
        internal bool method_6(DxfHandledObject sourceObject, string fieldName, ref WW.Math.Vector3D normal)
        {
            bool   flag = false;
            string str  = (string)null;

            if (DxfModelRepairer.smethod_0(normal.X))
            {
                flag = true;
                str  = "X";
            }
            if (DxfModelRepairer.smethod_0(normal.Y))
            {
                flag = true;
                str  = !string.IsNullOrEmpty(str) ? str + ", Y" : "Y";
            }
            if (DxfModelRepairer.smethod_0(normal.Z))
            {
                flag = true;
                str  = !string.IsNullOrEmpty(str) ? str + " and Z" : "Z";
            }
            if (flag)
            {
                normal = WW.Math.Vector3D.ZAxis;
                this.ilist_0.Add(new DxfMessage(DxfStatus.InvalidNormal, Severity.Warning, "FieldName", (object)fieldName)
                {
                    Parameters =
                    {
                        {
                            "Object",
                            (object)sourceObject
                        },
                        {
                            "InvalidCoordinates",
                            (object)str
                        }
                    }
                });
            }
            return(flag);
        }
예제 #16
0
 public Vector3D(WW.Math.Vector3D value)
 {
     this.vector3D_0 = value;
 }
예제 #17
0
 public DxfToleranceObjectContextData(DxfTolerance tolerance, DxfScale scale)
     : base(scale)
 {
     this.point3D_0  = tolerance.InsertionPoint;
     this.vector3D_0 = tolerance.XAxis;
 }
예제 #18
0
파일: Class551.cs 프로젝트: 15831944/WW
        public void method_0(DxfTable table, DxfTableContent tableContent)
        {
            this.vector3D_0 = table.HorizontalDirection;
            int num = tableContent.RowCount;

            if (table.BreakData != null && table.BreakData.OptionFlags != TableBreakOptionFlags.None && table.BreakData.RowRanges.Count > 0)
            {
                num = table.BreakData.RowRanges[0].EndRowIndex + 1;
            }
            this.method_7(num, false);
            this.method_8(tableContent.ColumnCount, false);
            if (tableContent.TableStyle == null)
            {
                throw new ArgumentException("Table style is not set on table content.");
            }
            this.TableStyle           = tableContent.TableStyle;
            this.FlowDirection        = tableContent.FlowDirection;
            this.SuppressTitle        = tableContent.SuppressTitle == this.TableStyle.SuppressTitle ? new bool?() : new bool?(tableContent.SuppressTitle);
            this.SuppressHeaderRow    = tableContent.SuppressHeaderRow == this.TableStyle.SuppressHeaderRow ? new bool?() : new bool?(tableContent.SuppressHeaderRow);
            this.VerticalCellMargin   = !tableContent.CellStyleOverrides.OverrideVerticalMargin ? new double?() : new double?(tableContent.CellStyleOverrides.VerticalMargin);
            this.HorizontalCellMargin = !tableContent.CellStyleOverrides.OverrideHorizontalMargin ? new double?() : new double?(tableContent.CellStyleOverrides.HorizontalMargin);
            for (int rowIndex = 0; rowIndex < this.RowCount; ++rowIndex)
            {
                Class430    class430 = this.class429_0[rowIndex];
                DxfTableRow row      = tableContent.Rows[rowIndex];
                class430.Height = row.Height;
                for (int columnIndex = 0; columnIndex < this.ColumnCount; ++columnIndex)
                {
                    Class1026            cell1 = class430.Cells[columnIndex];
                    DxfTableCell         cell2 = row.Cells[columnIndex];
                    TableCellContentType tableCellContentType1 = TableCellContentType.Value;
                    DxfTableCellContent  tableCellContent      = (DxfTableCellContent)null;
                    DxfTableCellStyle    cellStyle             = this.GetCellStyle(rowIndex, columnIndex);
                    TableCellContentType tableCellContentType2;
                    if (cell2.Contents.Count > 0)
                    {
                        tableCellContentType1 = TableCellContentType.Value;
                        tableCellContentType1 = TableCellContentType.Value;
                        tableCellContent      = cell2.Contents[0];
                        tableCellContentType2 = tableCellContent.ContentType;
                        switch (tableCellContentType2)
                        {
                        case TableCellContentType.Value:
                        case TableCellContentType.Field:
                            break;

                        case TableCellContentType.Block:
                            cell1.CellType = Enum47.const_2;
                            cell1.Value.method_0(DxfValueFormat.GeneralInstance);
                            cell1.Value.method_1((object)null);
                            cell1.Value.method_2((string)null);
                            cell1.AutoFit    = table.GetAutoScale(rowIndex, columnIndex, -1);
                            cell1.BlockScale = table.GetBlockScale(rowIndex, columnIndex, -1);
                            cell1.Rotation   = table.GetRotation(rowIndex, columnIndex, -1);
                            if (tableCellContent != null)
                            {
                                cell1.BlockOrField = (DxfHandledObject)(tableCellContent.ValueObject as DxfBlock);
                                cell1.AutoFit      = table.GetAutoScale(rowIndex, columnIndex, 0);
                                cell1.BlockScale   = table.GetBlockScale(rowIndex, columnIndex, 0);
                                cell1.Rotation     = table.GetRotation(rowIndex, columnIndex, 0);
                                goto label_16;
                            }
                            else
                            {
                                goto label_16;
                            }

                        default:
                            goto label_16;
                        }
                    }
                    else
                    {
                        tableCellContentType1 = TableCellContentType.Value;
                        tableCellContentType2 = TableCellContentType.Value;
                    }
                    cell1.CellType = Enum47.const_1;
                    if (tableCellContent != null)
                    {
                        cell1.BlockOrField = tableCellContentType2 != TableCellContentType.Field ? (DxfHandledObject)null : tableCellContent.ValueObject;
                        cell1.Value.CopyFromShallow(tableCellContent.Value);
                        double?rotationOverride = table.GetRotationOverride(rowIndex, columnIndex, 0, cellStyle);
                        cell1.Rotation   = rotationOverride.HasValue ? rotationOverride.Value : 0.0;
                        cell1.TextStyle  = table.GetTextStyleOverride(rowIndex, columnIndex, 0, cellStyle);
                        cell1.TextHeight = table.GetTextHeightOverride(rowIndex, columnIndex, 0, cellStyle);
                    }
                    else
                    {
                        cell1.BlockOrField = (DxfHandledObject)null;
                        if (cell2.Contents.Count > 0)
                        {
                            cell1.Value.CopyFromShallow(cell2.Contents[0].Value);
                        }
                        double?rotationOverride = table.GetRotationOverride(rowIndex, columnIndex, -1, cellStyle);
                        cell1.Rotation   = rotationOverride.HasValue ? rotationOverride.Value : 0.0;
                        cell1.TextStyle  = table.GetTextStyleOverride(rowIndex, columnIndex, -1, cellStyle);
                        cell1.TextHeight = table.GetTextHeightOverride(rowIndex, columnIndex, -1, cellStyle);
                    }
label_16:
                    cell1.CellAlignment = table.GetCellAlignmentOverride(rowIndex, columnIndex, -1, cellStyle);
                    Color?contentColorOverride = table.GetContentColorOverride(rowIndex, columnIndex, -1, cellStyle);
                    cell1.ContentColor = contentColorOverride.HasValue ? new Color?(contentColorOverride.Value) : new Color?();
                    Color?backColor = table.GetBackColor(rowIndex, columnIndex);
                    if (backColor.HasValue)
                    {
                        cell1.BackColor          = new Color?(backColor.Value);
                        cell1.IsBackColorEnabled = new bool?(true);
                    }
                    else
                    {
                        cell1.BackColor          = new Color?();
                        cell1.IsBackColorEnabled = new bool?();
                    }
                    for (int borderIndex = 0; borderIndex < 4; ++borderIndex)
                    {
                        DxfTableBorder          dxfTableBorder       = cell2.CellStyleOverrides.method_21(borderIndex + 2);
                        DxfTableBorderOverrides tableBorderOverrides = cell1.method_6(borderIndex);
                        tableBorderOverrides.Color      = !dxfTableBorder.OverrideColor ? new Color?() : new Color?(dxfTableBorder.Color);
                        tableBorderOverrides.LineWeight = !dxfTableBorder.OverrideLineWeight ? new short?() : new short?(dxfTableBorder.LineWeight);
                        tableBorderOverrides.Visible    = !dxfTableBorder.OverrideVisibility ? new bool?() : new bool?(dxfTableBorder.Visible);
                    }
                }
            }
            for (int index = 0; index < this.ColumnCount; ++index)
            {
                this.class912_0[index].Width = tableContent.Columns[index].Width;
            }
            foreach (DxfTableCellRange mergedCellRange in (List <DxfTableCellRange>)tableContent.MergedCellRanges)
            {
                if ((mergedCellRange.TopRowIndex != mergedCellRange.BottomRowIndex || mergedCellRange.LeftColumnIndex != mergedCellRange.RightColumnIndex) && (mergedCellRange.TopRowIndex < this.RowCount && mergedCellRange.LeftColumnIndex < this.ColumnCount))
                {
                    Class1026 cell = this.class429_0[mergedCellRange.TopRowIndex].Cells[mergedCellRange.LeftColumnIndex];
                    cell.MergedCellCountHorizontal = mergedCellRange.RightColumnIndex - mergedCellRange.LeftColumnIndex + 1;
                    cell.MergedCellCountVertical   = mergedCellRange.BottomRowIndex - mergedCellRange.TopRowIndex + 1;
                }
            }
        }