コード例 #1
0
ファイル: DxfContentFormat.cs プロジェクト: 15831944/WW
 public void CopyFrom(DxfContentFormat from, CloneContext cloneContext)
 {
     if (from.TextStyle == null)
     {
         this.dxfTextStyle_0 = (DxfTextStyle)null;
     }
     else if (cloneContext.SourceModel == cloneContext.TargetModel)
     {
         this.dxfTextStyle_0 = from.dxfTextStyle_0;
     }
     else if (!cloneContext.TargetModel.TextStyles.TryGetValue(from.dxfTextStyle_0.Name, out this.dxfTextStyle_0))
     {
         if (cloneContext.ReferenceResolutionType == ReferenceResolutionType.CloneMissing)
         {
             this.dxfTextStyle_0 = (DxfTextStyle)from.dxfTextStyle_0.Clone(cloneContext);
             if (!cloneContext.CloneExact)
             {
                 cloneContext.TargetModel.TextStyles.Add(this.dxfTextStyle_0);
             }
         }
         else if (cloneContext.ReferenceResolutionType == ReferenceResolutionType.FailOnMissing)
         {
             throw new DxfException("Missing text style with name " + from.dxfTextStyle_0.Name + " in target model.");
         }
     }
     this.double_0         = from.double_0;
     this.cellAlignment_0  = from.cellAlignment_0;
     this.color_0          = from.color_0;
     this.dxfValueFormat_0 = from.dxfValueFormat_0.Clone();
     this.double_1         = from.double_1;
     this.short_0          = from.short_0;
     this.tableCellStylePropertyFlags_0 = from.tableCellStylePropertyFlags_0;
     this.tableCellStylePropertyFlags_1 = from.tableCellStylePropertyFlags_1;
     this.double_2 = from.double_2;
 }
コード例 #2
0
ファイル: DxfContentFormat.cs プロジェクト: 15831944/WW
        public virtual IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfContentFormat dxfContentFormat = new DxfContentFormat();

            dxfContentFormat.CopyFrom(this, cloneContext);
            return((IGraphCloneable)dxfContentFormat);
        }