Beispiel #1
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The <see cref="GraphObj"/> object from which to copy</param>
        public GraphObj(GraphObj rhs)
        {
            // Copy value types
            _isVisible            = rhs.IsVisible;
            _isClippedToChartRect = rhs._isClippedToChartRect;
            _zOrder = rhs.ZOrder;

            // copy reference types by cloning
            if (rhs.Tag is ICloneable)
            {
                this.Tag = ((ICloneable)rhs.Tag).Clone();
            }
            else
            {
                this.Tag = rhs.Tag;
            }

            _location = rhs.Location.Clone();
            _link     = rhs._link.Clone();
        }
Beispiel #2
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The <see cref="GraphObj"/> object from which to copy</param>
        public GraphObj( GraphObj rhs )
        {
            // Copy value types
            _isVisible = rhs.IsVisible;
            _isClippedToChartRect = rhs._isClippedToChartRect;
            _zOrder = rhs.ZOrder;

            // copy reference types by cloning
            if ( rhs.Tag is ICloneable )
                this.Tag = ((ICloneable) rhs.Tag).Clone();
            else
                this.Tag = rhs.Tag;

            _location = rhs.Location.Clone();
            _link = rhs._link.Clone();
        }