public override bool CopyFrom(object obj) { if (object.ReferenceEquals(this, obj)) { return(true); } var from = obj as ScaleSegment; if (null == from) { return(false); } using (var suspendToken = SuspendGetToken()) { _relOrg = from._relOrg; _relEnd = from._relEnd; _underlyingScale = from._underlyingScale; _segmentScaling = from._segmentScaling; EhSelfChanged(EventArgs.Empty); suspendToken.Resume(); } return(true); }
public override bool CopyFrom(object obj) { bool isCopied = base.CopyFrom(obj); if (isCopied && !object.ReferenceEquals(this, obj)) { var from = obj as FloatingScale; if (null != from) { _cachedPath = null; _scaleSpanValue = from._scaleSpanValue; _scaleSpanType = from._scaleSpanType; _scaleNumber = from._scaleNumber; _scaleSegmentType = from._scaleSegmentType; CopyHelper.Copy(ref _tickSpacing, from._tickSpacing); CopyHelper.Copy(ref _axisStyle, from._axisStyle); _backgroundPadding = from._backgroundPadding; CopyHelper.Copy(ref _background, from._background); } } return(isCopied); }
public ScaleSegment(Scale underlyingScale, double relOrg, double relEnd, ScaleSegmentType scaling) { if (null == underlyingScale) { throw new ArgumentNullException("underlyingScale"); } _underlyingScale = underlyingScale; _relOrg = relOrg; _relEnd = relEnd; _segmentScaling = scaling; }
public override bool CopyFrom(object obj) { if (object.ReferenceEquals(this, obj)) return true; var from = obj as ScaleSegment; if (null == from) return false; using (var suspendToken = SuspendGetToken()) { this._relOrg = from._relOrg; this._relEnd = from._relEnd; this._underlyingScale = from._underlyingScale; this._segmentScaling = from._segmentScaling; EhSelfChanged(EventArgs.Empty); suspendToken.Resume(); } return true; }
public ScaleSegment(Scale underlyingScale, double relOrg, double relEnd, ScaleSegmentType scaling) { if (null == underlyingScale) throw new ArgumentNullException("underlyingScale"); _underlyingScale = underlyingScale; _relOrg = relOrg; _relEnd = relEnd; _segmentScaling = scaling; }
public override bool CopyFrom(object obj) { bool isCopied = base.CopyFrom(obj); if (isCopied && !object.ReferenceEquals(this, obj)) { var from = obj as FloatingScale; if (null != from) { _cachedPath = null; _scaleSpanValue = from._scaleSpanValue; _scaleSpanType = from._scaleSpanType; _scaleNumber = from._scaleNumber; _scaleSegmentType = from._scaleSegmentType; CopyHelper.Copy(ref _tickSpacing, from._tickSpacing); CopyHelper.Copy(ref _axisStyle, from._axisStyle); _backgroundPadding = from._backgroundPadding; CopyHelper.Copy(ref _background, from._background); } } return isCopied; }