本文整理汇总了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();
}
示例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;
}
}
示例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);
}
示例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();
}
示例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;
}
示例6: AsyncDicomGrayscalePresentationImage
protected AsyncDicomGrayscalePresentationImage(DicomGrayscalePresentationImage source, ICloningContext context)
: base(source, context)
{
context.CloneFields(source, this);
Initialize();
}
示例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);
}
}
示例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();
}
示例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();
}
示例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());
}
示例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;
}
}
示例12: SingleImagesDisplaySetDescriptor
protected SingleImagesDisplaySetDescriptor(SingleImagesDisplaySetDescriptor source, ICloningContext context)
: base(source, context)
{
context.CloneFields(source, this);
}
示例13: MultiframeDisplaySetDescriptor
protected MultiframeDisplaySetDescriptor(MultiframeDisplaySetDescriptor source, ICloningContext context)
: base(source, context)
{
context.CloneFields(source, this);
}
示例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);
}
示例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();
}