Exemplo n.º 1
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfLayout dxfLayout = (DxfLayout)from;

            this.bool_0             = dxfLayout.bool_0;
            this.string_8           = dxfLayout.string_8;
            this.layoutOptions_0    = dxfLayout.layoutOptions_0;
            this.int_0              = dxfLayout.int_0;
            this.rectangle2D_1      = dxfLayout.rectangle2D_1;
            this.point3D_0          = dxfLayout.point3D_0;
            this.point3D_1          = dxfLayout.point3D_1;
            this.point3D_2          = dxfLayout.point3D_2;
            this.double_7           = dxfLayout.double_7;
            this.Ucs                = Class906.smethod_2(cloneContext, dxfLayout.Ucs);
            this.orthographicType_0 = dxfLayout.orthographicType_0;
            DxfBlock ownerBlock = dxfLayout.OwnerBlock;

            if (ownerBlock != null && ownerBlock.BlockBegin != null)
            {
                this.OwnerBlock = Class906.smethod_0(cloneContext, ownerBlock, true);
            }
            foreach (DxfHandledObject dxfHandledObject in (DxfHandledObjectCollection <DxfViewport>)dxfLayout.dxfViewportCollection_0)
            {
                this.dxfViewportCollection_0.Add((DxfViewport)dxfHandledObject.Clone(cloneContext));
            }
            this.LastActiveViewport = (DxfHandledObject)cloneContext.GetExistingClone((IGraphCloneable)dxfLayout.LastActiveViewport);
            switch (dxfLayout.Handle)
            {
            case 30:
            case 34:
                this.SetHandle(dxfLayout.Handle);
                break;
            }
        }
Exemplo n.º 2
0
        public IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfVisibilityState dxfVisibilityState = (DxfVisibilityState)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfVisibilityState == null)
            {
                dxfVisibilityState = new DxfVisibilityState();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfVisibilityState);
                dxfVisibilityState.Name = this.Name;
                if (this.SelectionSet1 != null)
                {
                    dxfVisibilityState.SelectionSet1 = new DxfHandledObjectCollection <DxfHandledObject>(this.SelectionSet1.Count);
                    for (int index = 0; index < this.dxfHandledObjectCollection_0.Count; ++index)
                    {
                        dxfVisibilityState.SelectionSet1.Add(this.SelectionSet1[index].Clone(cloneContext) as DxfHandledObject);
                    }
                }
                if (this.SelectionSet2 != null)
                {
                    dxfVisibilityState.SelectionSet2 = new DxfHandledObjectCollection <DxfHandledObject>(this.SelectionSet2.Count);
                    for (int index = 0; index < this.dxfHandledObjectCollection_1.Count; ++index)
                    {
                        dxfVisibilityState.SelectionSet2.Add(this.SelectionSet2[index].Clone(cloneContext) as DxfHandledObject);
                    }
                }
            }
            return((IGraphCloneable)dxfVisibilityState);
        }
Exemplo n.º 3
0
        internal static DxfColor smethod_10(CloneContext cloneContext, DxfColor from)
        {
            if (from == null)
            {
                return((DxfColor)null);
            }
            if (cloneContext.SourceModel == cloneContext.TargetModel)
            {
                return(from);
            }
            DxfColor dxfColor1 = (DxfColor)null;

            if (!string.IsNullOrEmpty(from.Color.Name))
            {
                dxfColor1 = (DxfColor)cloneContext.GetExistingClone((IGraphCloneable)from) ?? cloneContext.TargetModel.Colors.GetColor(from.Color.ColorBookName, from.Color.Name);
                if (dxfColor1 == null)
                {
                    switch (cloneContext.ReferenceResolutionType)
                    {
                    case ReferenceResolutionType.CloneMissing:
                        DxfColor dxfColor2 = (DxfColor)from.Clone(cloneContext);
                        if (!cloneContext.CloneExact)
                        {
                            cloneContext.TargetModel.Colors.Add(dxfColor2);
                        }
                        dxfColor1 = dxfColor2;
                        break;

                    case ReferenceResolutionType.FailOnMissing:
                        throw new DxfException(string.Format("Could not resolve reference to color with book name {0} and name {1}", (object)from.Color.ColorBookName, (object)from.Color.Name));
                    }
                }
            }
            return(dxfColor1);
        }
Exemplo n.º 4
0
 public IGraphCloneable Clone(CloneContext cloneContext)
 {
     DxfEvalGraph.GraphNodeId graphNodeId = (DxfEvalGraph.GraphNodeId)cloneContext.GetExistingClone((IGraphCloneable)this);
     if (graphNodeId == null)
     {
         graphNodeId = new DxfEvalGraph.GraphNodeId();
         cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)graphNodeId);
         graphNodeId.CopyFrom(this);
     }
     return((IGraphCloneable)graphNodeId);
 }
Exemplo n.º 5
0
 public IGraphCloneable Clone(CloneContext cloneContext)
 {
     DxfEvalGraph.GraphEdge graphEdge = (DxfEvalGraph.GraphEdge)cloneContext.GetExistingClone((IGraphCloneable)this);
     if (graphEdge == null)
     {
         graphEdge = new DxfEvalGraph.GraphEdge();
         cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)graphEdge);
         graphEdge.CopyFrom(cloneContext, this);
     }
     return((IGraphCloneable)graphEdge);
 }
Exemplo n.º 6
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfPolyline2DSpline polyline2Dspline = (DxfPolyline2DSpline)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (polyline2Dspline == null)
            {
                polyline2Dspline = new DxfPolyline2DSpline();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)polyline2Dspline);
                polyline2Dspline.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)polyline2Dspline);
        }
Exemplo n.º 7
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfXRecord dxfXrecord = (DxfXRecord)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfXrecord == null)
            {
                dxfXrecord = new DxfXRecord();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfXrecord);
                dxfXrecord.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfXrecord);
        }
Exemplo n.º 8
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfProxyEntity dxfProxyEntity = (DxfProxyEntity)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfProxyEntity == null)
            {
                dxfProxyEntity = new DxfProxyEntity();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfProxyEntity);
                dxfProxyEntity.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfProxyEntity);
        }
Exemplo n.º 9
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfBlockGripExpression blockGripExpression = (DxfBlockGripExpression)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (blockGripExpression == null)
            {
                blockGripExpression = new DxfBlockGripExpression();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)blockGripExpression);
                blockGripExpression.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)blockGripExpression);
        }
Exemplo n.º 10
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfIDBlockReference idBlockReference = (DxfIDBlockReference)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (idBlockReference == null)
            {
                idBlockReference = new DxfIDBlockReference();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)idBlockReference);
                idBlockReference.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)idBlockReference);
        }
Exemplo n.º 11
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfHatchScaleContextData scaleContextData = (DxfHatchScaleContextData)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (scaleContextData == null)
            {
                scaleContextData = new DxfHatchScaleContextData();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)scaleContextData);
                scaleContextData.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)scaleContextData);
        }
Exemplo n.º 12
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfBlockLinearParameter blockLinearParameter = (DxfBlockLinearParameter)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (blockLinearParameter == null)
            {
                blockLinearParameter = new DxfBlockLinearParameter();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)blockLinearParameter);
                blockLinearParameter.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)blockLinearParameter);
        }
Exemplo n.º 13
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfObject dxfObject = (DxfObject)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfObject == null)
            {
                dxfObject = (DxfObject) new DxfCellStyleMap();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfObject);
                dxfObject.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfObject);
        }
Exemplo n.º 14
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfTolerance dxfTolerance = (DxfTolerance)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfTolerance == null)
            {
                dxfTolerance = new DxfTolerance(cloneContext.TargetModel);
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfTolerance);
                dxfTolerance.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfTolerance);
        }
Exemplo n.º 15
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfAttributeDefinition attributeDefinition = (DxfAttributeDefinition)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (attributeDefinition == null)
            {
                attributeDefinition = new DxfAttributeDefinition();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)attributeDefinition);
                attributeDefinition.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)attributeDefinition);
        }
Exemplo n.º 16
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfBlock dxfBlock = (DxfBlock)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfBlock == null)
            {
                dxfBlock = new DxfBlock(false);
                this.RegisterClone(cloneContext, (IGraphCloneable)dxfBlock);
                dxfBlock.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfBlock);
        }
Exemplo n.º 17
0
        public IGraphCloneable Clone(CloneContext cloneContext)
        {
            Class551 class551 = (Class551)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (class551 == null)
            {
                class551 = new Class551();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)class551);
                class551.CopyFrom(this, cloneContext);
            }
            return((IGraphCloneable)class551);
        }
Exemplo n.º 18
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfBlockFlipAction dxfBlockFlipAction = (DxfBlockFlipAction)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfBlockFlipAction == null)
            {
                dxfBlockFlipAction = new DxfBlockFlipAction();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfBlockFlipAction);
                dxfBlockFlipAction.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfBlockFlipAction);
        }
Exemplo n.º 19
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfBlockAlignmentGrip blockAlignmentGrip = (DxfBlockAlignmentGrip)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (blockAlignmentGrip == null)
            {
                blockAlignmentGrip = new DxfBlockAlignmentGrip();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)blockAlignmentGrip);
                blockAlignmentGrip.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)blockAlignmentGrip);
        }
Exemplo n.º 20
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfLeader dxfLeader = (DxfLeader)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfLeader == null)
            {
                dxfLeader = new DxfLeader(cloneContext.TargetModel);
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfLeader);
                dxfLeader.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfLeader);
        }
Exemplo n.º 21
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfPolyline3D dxfPolyline3D = (DxfPolyline3D)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfPolyline3D == null)
            {
                dxfPolyline3D = new DxfPolyline3D();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfPolyline3D);
                dxfPolyline3D.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfPolyline3D);
        }
Exemplo n.º 22
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfRasterVariables dxfRasterVariables = (DxfRasterVariables)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfRasterVariables == null)
            {
                dxfRasterVariables = new DxfRasterVariables();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfRasterVariables);
                dxfRasterVariables.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfRasterVariables);
        }
Exemplo n.º 23
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfViewportEntityHeader viewportEntityHeader = (DxfViewportEntityHeader)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (viewportEntityHeader == null)
            {
                viewportEntityHeader = new DxfViewportEntityHeader();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)viewportEntityHeader);
                viewportEntityHeader.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)viewportEntityHeader);
        }
Exemplo n.º 24
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfBlockXYGrip dxfBlockXyGrip = (DxfBlockXYGrip)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfBlockXyGrip == null)
            {
                dxfBlockXyGrip = new DxfBlockXYGrip();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfBlockXyGrip);
                dxfBlockXyGrip.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfBlockXyGrip);
        }
Exemplo n.º 25
0
        public IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfConnectionPoint dxfConnectionPoint = (DxfConnectionPoint)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfConnectionPoint == null)
            {
                dxfConnectionPoint = new DxfConnectionPoint();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfConnectionPoint);
                dxfConnectionPoint.CopyFrom(cloneContext, this);
            }
            return((IGraphCloneable)dxfConnectionPoint);
        }
Exemplo n.º 26
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfPolygonMesh dxfPolygonMesh = (DxfPolygonMesh)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfPolygonMesh == null)
            {
                dxfPolygonMesh = new DxfPolygonMesh();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfPolygonMesh);
                dxfPolygonMesh.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfPolygonMesh);
        }
Exemplo n.º 27
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfLinkedTableData dxfLinkedTableData = (DxfLinkedTableData)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfLinkedTableData == null)
            {
                dxfLinkedTableData = new DxfLinkedTableData();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfLinkedTableData);
                dxfLinkedTableData.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfLinkedTableData);
        }
Exemplo n.º 28
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfCircle dxfCircle = (DxfCircle)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfCircle == null)
            {
                dxfCircle = new DxfCircle();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfCircle);
                dxfCircle.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfCircle);
        }
Exemplo n.º 29
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfBlockPropertiesTable blockPropertiesTable = (DxfBlockPropertiesTable)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (blockPropertiesTable == null)
            {
                blockPropertiesTable = new DxfBlockPropertiesTable();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)blockPropertiesTable);
                blockPropertiesTable.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)blockPropertiesTable);
        }
Exemplo n.º 30
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfDictionary dictionary = (DxfDictionary)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dictionary == null)
            {
                dictionary = new DxfDictionary(false);
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dictionary);
                dictionary.CopyFrom((DxfHandledObject)this, cloneContext);
                cloneContext.CloneBuilders.Add((ICloneBuilder) new DxfDictionary.Class753(dictionary));
            }
            return((IGraphCloneable)dictionary);
        }