当前位置: 首页>>代码示例>>C#>>正文


C# ICloningContext.CloneFields方法代码示例

本文整理汇总了C#中ICloningContext.CloneFields方法的典型用法代码示例。如果您正苦于以下问题:C# ICloningContext.CloneFields方法的具体用法?C# ICloningContext.CloneFields怎么用?C# ICloningContext.CloneFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ICloningContext的用法示例。


在下文中一共展示了ICloningContext.CloneFields方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SimpleDataModalityLut

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected SimpleDataModalityLut(SimpleDataModalityLut source, ICloningContext context)
		{
			context.CloneFields(source, this);

			//clone the actual buffer
			_data = (double[]) source._data.Clone();
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:12,代码来源:SimpleDataModalityLut.cs

示例2: MammogramAnnotationLayoutProxy

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected MammogramAnnotationLayoutProxy(MammogramAnnotationLayoutProxy source, ICloningContext context)
		{
			context.CloneFields(source, this);

			// clone the annotation boxes with their state!
			if (source._annotationBoxes != null)
			{
				var annotationBoxes = new Dictionary<object, AnnotationBox>();
				foreach (var sourceBox in source._annotationBoxes.Values)
				{
					var cloneBox = (AnnotationBox) CloneBuilder.Clone(sourceBox);

					// if the box has an item, use the item's identifier as the key
					object key = cloneBox;
					if (cloneBox.AnnotationItem != null)
					{
						key = cloneBox.AnnotationItem.GetIdentifier();

						// if for some reason the key is a duplicate, use the box as the key (but keep it as part of the layout!)
						if (annotationBoxes.ContainsKey(key))
							key = cloneBox;
					}
					annotationBoxes.Add(key, cloneBox);
				}
				_annotationBoxes = annotationBoxes;
			}
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:32,代码来源:MammogramAnnotationLayoutProxy.cs

示例3: ColorMapManagerProxy

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected ColorMapManagerProxy(ColorMapManagerProxy source, ICloningContext context)
		{
			context.CloneFields(source, this);

			_placeholderColorMapManager = new ColorMapManager(_placeholderColorMapInstaller = source._placeholderColorMapInstaller.Clone());
			_layerOpacityManager = new XLayerOpacityManager(this);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:12,代码来源:ColorMapManagerProxy.cs

示例4: FusionPresentationImage

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected FusionPresentationImage(FusionPresentationImage source, ICloningContext context) : base(source, context)
		{
			context.CloneFields(source, this);

			_baseFrameReference = source._baseFrameReference.Clone();
			_overlayFrameDataReference = source._overlayFrameDataReference.Clone();
		}
开发者ID:nhannd,项目名称:Xian,代码行数:12,代码来源:FusionPresentationImage.cs

示例5: FusionOverlayCompositeGraphic

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected FusionOverlayCompositeGraphic(FusionOverlayCompositeGraphic source, ICloningContext context)
		{
			context.CloneFields(source, this);

			_overlayFrameDataReference = source._overlayFrameDataReference.Clone();
			_overlayFrameDataReference.FusionOverlayFrameData.Unloaded += HandleOverlayFrameDataUnloaded;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:12,代码来源:FusionOverlayCompositeGraphic.cs

示例6: AsyncDicomGrayscalePresentationImage

		protected AsyncDicomGrayscalePresentationImage(DicomGrayscalePresentationImage source, ICloningContext context)
			: base(source, context)
		{
			context.CloneFields(source, this);

			Initialize();
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:7,代码来源:AsyncDicomGrayscalePresentationImage.cs

示例7: RoiCalloutGraphic

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected RoiCalloutGraphic(RoiCalloutGraphic source, ICloningContext context)
			: base(source, context)
		{
			context.CloneFields(source, this);
			_roiAnalyzers.AddRange(source._roiAnalyzers);
            foreach(var analyzer in _roiAnalyzers)
            {
                analyzer.SetRoiAnalyzerUpdateCallback(Refresh);
            }
		}
开发者ID:nhannd,项目名称:Xian,代码行数:15,代码来源:RoiCalloutGraphic.cs

示例8: RootModelSpatialTransform

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected RootModelSpatialTransform(RootModelSpatialTransform source, ICloningContext context)
			: base(source, context)
		{
			context.CloneFields(source, this);

			_rootTransform3D.ParentTransform = this;

			if (source._cumulativeTransform3D != null)
				_cumulativeTransform3D = source._cumulativeTransform3D.Clone();
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:15,代码来源:RootModelSpatialTransform.cs

示例9: SpatialTransform

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		protected SpatialTransform(SpatialTransform source, ICloningContext context)
		{
			context.CloneFields(source, this);

			if (source._cumulativeTransform != null)
				_cumulativeTransform = source._cumulativeTransform.Clone();

			if (source._transform != null)
				_transform = source._transform.Clone();
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:13,代码来源:SpatialTransform.cs

示例10: GeometricShuttersGraphic

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected GeometricShuttersGraphic(GeometricShuttersGraphic source, ICloningContext context)
			: this(source._imageRectangle.Height, source._imageRectangle.Width)
		{
			context.CloneFields(source, this);

			foreach (GeometricShutter shutter in source._customShutters)
				_customShutters.Add(shutter.Clone());

			foreach (GeometricShutter shutter in source._dicomShutters)
				_dicomShutters.Add(shutter.Clone());
		}
开发者ID:nhannd,项目名称:Xian,代码行数:16,代码来源:GeometricShuttersGraphic.cs

示例11: MammogramAnnotationLayoutProxy

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected MammogramAnnotationLayoutProxy(MammogramAnnotationLayoutProxy source, ICloningContext context)
		{
			context.CloneFields(source, this);

			// clone the annotation boxes with their state!
			if (source._annotationBoxes != null)
			{
				var annotationBoxes = new Dictionary<object, AnnotationBox>();
				foreach (var sourceBox in source._annotationBoxes.Values)
				{
					var cloneBox = (AnnotationBox) CloneBuilder.Clone(sourceBox);
					if (cloneBox.AnnotationItem != null)
						annotationBoxes.Add(cloneBox.AnnotationItem.GetIdentifier(), cloneBox);
					else
						annotationBoxes.Add(cloneBox, cloneBox);
				}
				_annotationBoxes = annotationBoxes;
			}
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:24,代码来源:MammogramAnnotationLayoutProxy.cs

示例12: SingleImagesDisplaySetDescriptor

		protected SingleImagesDisplaySetDescriptor(SingleImagesDisplaySetDescriptor source, ICloningContext context)
			: base(source, context)
		{
			context.CloneFields(source, this);
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:5,代码来源:DisplaySetFactories.cs

示例13: MultiframeDisplaySetDescriptor

		protected MultiframeDisplaySetDescriptor(MultiframeDisplaySetDescriptor source, ICloningContext context)
			: base(source, context)
		{
			context.CloneFields(source, this);
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:5,代码来源:DisplaySetFactories.cs

示例14: OverlayPlaneGraphic

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected OverlayPlaneGraphic(OverlayPlaneGraphic source, ICloningContext context) : base()
		{
			context.CloneFields(source, this);
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:9,代码来源:OverlayPlaneGraphic.cs

示例15: ColorBarGraphic

		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected ColorBarGraphic(ColorBarGraphic source, ICloningContext context)
		{
			context.CloneFields(source, this);

			_colorMapManagerProxy = new ColorMapManager(new ColorMapInstallerProxy());
			if (source._colorMapManagerProxy.ColorMap != null)
				_colorMapManagerProxy.SetMemento(source._colorMapManagerProxy.CreateMemento());

			if (source._gradientPixelData != null)
				_gradientPixelData = source._gradientPixelData.Clone();
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:16,代码来源:ColorBarGraphic.cs


注:本文中的ICloningContext.CloneFields方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。