示例#1
0
文件: LineItem.cs 项目: CareyGit/jx
		/// <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 LineItem( SerializationInfo info, StreamingContext context ) : base( info, 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( "schema2" );

			_symbol = (Symbol) info.GetValue( "symbol", typeof(Symbol) );
			_line = (Line) info.GetValue( "line", typeof(Line) );
		}
示例#2
0
文件: LineItem.cs 项目: CareyGit/jx
		/// <summary>
		/// Create a new <see c_ref="LineItem"/> using the specified properties.
		/// </summary>
		/// <param name="label">The _label that will appear in the legend.</param>
		/// <param name="points">A <see c_ref="IPointList"/> of double precision value pairs that define
		/// the X and Y values for this curve</param>
		/// <param name="color">A <see c_ref="Color"/> value that will be applied to
		/// the <see c_ref="Line"/> and <see c_ref="Symbol"/> properties.
		/// </param>
		/// <param name="symbolType">A <see c_ref="SymbolType"/> enum specifying the
		/// type of symbol to use for this <see c_ref="LineItem"/>.  Use <see c_ref="SymbolType.None"/>
		/// to hide the symbols.</param>
		/// <param name="lineWidth">The width (in points) to be used for the <see c_ref="Line"/>.  This
		/// width is scaled based on <see c_ref="PaneBase.CalcScaleFactor"/>.  Use a value of zero to
		/// hide the line (see <see c_ref="ZedGraph.LineBase.IsVisible"/>).</param>
		public LineItem( string label, IPointList points, Color color, SymbolType symbolType, float lineWidth )
			: base( label, points )
		{
			_line = new Line( color );
			if ( lineWidth == 0 )
				_line.IsVisible = false;
			else
				_line.Width = lineWidth;

			_symbol = new Symbol( symbolType, color );
		}
示例#3
0
文件: LineItem.cs 项目: CareyGit/jx
		/// <summary>
		/// The Copy Constructor
		/// </summary>
		/// <param name="rhs">The <see c_ref="LineItem"/> object from which to copy</param>
		public LineItem( LineItem rhs ) : base( rhs )
		{
			_symbol = new Symbol( rhs.Symbol );
			_line = new Line( rhs.Line );
		}
示例#4
0
文件: LineItem.cs 项目: CareyGit/jx
		/// <summary>
		/// Create a new <see c_ref="LineItem"/>, specifying only the legend <see c_ref="CurveItem.Label" />.
		/// </summary>
		/// <param name="label">The _label that will appear in the legend.</param>
		public LineItem( string label ) : base( label )
		{
			_symbol = new Symbol();
			_line = new Line();
		}
示例#5
0
文件: Symbol.cs 项目: CareyGit/jx
		/// <summary>
		/// The Copy Constructor
		/// </summary>
		/// <param name="rhs">The Symbol object from which to copy</param>
		public Symbol( Symbol rhs )
		{
			_size = rhs.Size;
			_type = rhs.Type;
			_isAntiAlias = rhs._isAntiAlias;
			_isVisible = rhs.IsVisible;
			_fill = rhs.Fill.Clone();
			_border = rhs.Border.Clone();

			if ( rhs.UserSymbol != null )
				_userSymbol = rhs.UserSymbol.Clone() as GraphicsPath;
			else
				_userSymbol = null;
		}
示例#6
0
文件: ErrorBar.cs 项目: CareyGit/jx
		/// <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 ErrorBar( 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" );

			_isVisible = info.GetBoolean( "isVisible" );
			_color = (Color) info.GetValue( "color", typeof(Color) );
			_penWidth = info.GetSingle( "penWidth" );
			_symbol = (Symbol) info.GetValue( "symbol", typeof(Symbol) );
		}
示例#7
0
文件: ErrorBar.cs 项目: CareyGit/jx
		/// <summary>
		/// The Copy Constructor
		/// </summary>
		/// <param name="rhs">The <see c_ref="ErrorBar"/> object from which to copy</param>
		public ErrorBar( ErrorBar rhs )
		{
			_color = rhs.Color;
			_isVisible = rhs.IsVisible;
			_penWidth = rhs.PenWidth;
			_symbol = rhs.Symbol.Clone();
		}
示例#8
0
文件: ErrorBar.cs 项目: CareyGit/jx
		/// <summary>
		/// Default constructor that sets the
		/// <see c_ref="Color"/> as specified, and the remaining
		/// <see c_ref="ErrorBar"/> properties to default
		/// values as defined in the <see c_ref="Default"/> class.
		/// </summary>
		/// <param name="color">A <see c_ref="Color"/> value indicating
		/// the color of the symbol
		/// </param>
		public ErrorBar( Color color )
		{
			_symbol = new Symbol( Default.Type, color );
			_symbol.Size = Default.Size;
			_color = color;
			_penWidth = Default.PenWidth;
			_isVisible = Default.IsVisible;
		}