Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CurveItem"/> class. 
        /// Constructor for deserializing objects
        /// </summary>
        /// <param name="info">
        /// A <see cref="SerializationInfo"/> instance that defines the serialized data
        /// </param>
        /// <param name="context">
        /// A <see cref="StreamingContext"/> instance that contains the serialized data
        /// </param>
        protected CurveItem(SerializationInfo info, StreamingContext context)
        {
            // The schema value is just a file version parameter.  You can use it to make future versions
            // backwards compatible as new member variables are added to classes
            int sch = info.GetInt32("schema");

            this._label = (Label)info.GetValue("label", typeof(Label));
            this._isY2Axis = info.GetBoolean("isY2Axis");
            if (sch >= 11)
            {
                this._isX2Axis = info.GetBoolean("isX2Axis");
            }
            else
            {
                this._isX2Axis = false;
            }

            this._isVisible = info.GetBoolean("isVisible");

            this._isOverrideOrdinal = info.GetBoolean("isOverrideOrdinal");

            // Data Points are always stored as a PointPairList, regardless of the
            // actual original type (which could be anything that supports IPointList).
            this._points = (PointPairList)info.GetValue("points", typeof(PointPairList));

            this.Tag = info.GetValue("Tag", typeof(object));

            this._yAxisIndex = info.GetInt32("yAxisIndex");

            this._link = (Link)info.GetValue("link", typeof(Link));
        }
Exemple #2
0
 /// <summary>
 /// Internal initialization routine thats sets some initial values to defaults.
 /// </summary>
 /// <param name="label">
 /// A string label (legend entry) for this curve
 /// </param>
 private void Init(string label)
 {
     this._label = new Label(label, null);
     this._isY2Axis = false;
     this._isX2Axis = false;
     this._isVisible = true;
     this._isOverrideOrdinal = false;
     this.Tag = null;
     this._yAxisIndex = 0;
     this._link = new Link();
 }
Exemple #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CurveItem"/> class. 
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">
        /// The CurveItem object from which to copy
        /// </param>
        public CurveItem(CurveItem rhs)
        {
            this._label = rhs._label.Clone();
            this._isY2Axis = rhs.IsY2Axis;
            this._isX2Axis = rhs.IsX2Axis;
            this._isVisible = rhs.IsVisible;
            this._isOverrideOrdinal = rhs._isOverrideOrdinal;
            this._yAxisIndex = rhs._yAxisIndex;

            if (rhs.Tag is ICloneable)
            {
                this.Tag = ((ICloneable)rhs.Tag).Clone();
            }
            else
            {
                this.Tag = rhs.Tag;
            }

            this._points = (IPointList)rhs.Points.Clone();

            this._link = rhs._link.Clone();
        }
Exemple #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Label"/> class. 
        /// Copy constructor
        /// </summary>
        /// <param name="rhs">
        /// the <see cref="Label"/> instance to be copied.
        /// </param>
        public Label(Label rhs)
        {
            if (rhs._text != null)
            {
                this._text = (string)rhs._text.Clone();
            }
            else
            {
                this._text = string.Empty;
            }

            this._isVisible = rhs._isVisible;
            if (rhs._fontSpec != null)
            {
                this._fontSpec = rhs._fontSpec.Clone();
            }
            else
            {
                this._fontSpec = null;
            }
        }