Beispiel #1
0
		/// <summary>
		/// Constructor for deserializing objects
		/// </summary>
		/// <param name="info">A <see c_ref="SerializationInfo"/> instance that defines the serialized data
		/// </param>
		/// <param name="context">A <see c_ref="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" );

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

			_isVisible = info.GetBoolean( "isVisible" );

			_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).
			_points = (PointPairList) info.GetValue( "points", typeof(PointPairList) );

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

			_yAxisIndex = info.GetInt32( "yAxisIndex" );

			_link = (Link) info.GetValue( "link", typeof(Link) );

		}
Beispiel #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 )
		{
			_label = new Label( label, null );
			_isY2Axis = false;
			_isX2Axis = false;
			_isVisible = true;
			_isOverrideOrdinal = false;
			Tag = null;
			_yAxisIndex = 0;
			_link = new Link();
		}
Beispiel #3
0
		/// <summary>
		/// The Copy Constructor
		/// </summary>
		/// <param name="rhs">The CurveItem object from which to copy</param>
		public CurveItem( CurveItem rhs )
		{
			_label = rhs._label.Clone();
			_isY2Axis = rhs.IsY2Axis;
			_isX2Axis = rhs.IsX2Axis;
			_isVisible = rhs.IsVisible;
			_isOverrideOrdinal = rhs._isOverrideOrdinal;
			_yAxisIndex = rhs._yAxisIndex;

			if ( rhs.Tag is ICloneable )
				Tag = ((ICloneable) rhs.Tag).Clone();
			else
				Tag = rhs.Tag;
			
			_points = (IPointList) rhs.Points.Clone();

			_link = rhs._link.Clone();
		}
Beispiel #4
0
		/// <summary>
		/// Copy constructor
		/// </summary>
		/// <param name="rhs">the <see c_ref="Label" /> instance to be copied.</param>
		public Label( Label rhs )
		{
			if (rhs._text != null)
				_text = (string)rhs._text.Clone();
			else
				_text = string.Empty;

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