Exemple #1
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfBlockVisibilityParameter visibilityParameter = (DxfBlockVisibilityParameter)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (visibilityParameter == null)
            {
                visibilityParameter = new DxfBlockVisibilityParameter();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)visibilityParameter);
                visibilityParameter.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)visibilityParameter);
        }
Exemple #2
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfBlockVisibilityParameter visibilityParameter = (DxfBlockVisibilityParameter)from;

            this.LabelText        = visibilityParameter.LabelText;
            this.Description      = visibilityParameter.Description;
            this.UnknownFlag      = visibilityParameter.UnknownFlag;
            this.UnknownFlag2     = visibilityParameter.UnknownFlag2;
            this.VisibilityStates = new DxfVisibilityState[visibilityParameter.VisibilityStates.Length];
            for (int index = 0; index < visibilityParameter.VisibilityStates.Length; ++index)
            {
                this.VisibilityStates[index] = visibilityParameter.VisibilityStates[index].Clone(cloneContext) as DxfVisibilityState;
            }
            this.HandleSet = new DxfHandledObjectCollection <DxfHandledObject>(visibilityParameter.HandleSet.Count);
            for (int index = 0; index < visibilityParameter.HandleSet.Count; ++index)
            {
                this.HandleSet.Add(cloneContext.SourceModel == cloneContext.TargetModel ? visibilityParameter.dxfHandledObjectCollection_1[index] : visibilityParameter.dxfHandledObjectCollection_1[index].Clone(cloneContext) as DxfHandledObject);
            }
        }