示例#1
0
 /// <summary>
 /// Construct a new <see cref="ScaleStateList" /> automatically from an
 /// existing <see cref="YAxisList" />.
 /// </summary>
 /// <param name="list">The <see cref="YAxisList" /> (a list of Y axes),
 /// from which to retrieve the state and create the <see cref="ScaleState" />
 /// objects.</param>
 public ScaleStateList(YAxisList list)
 {
     foreach (Axis axis in list)
     {
         this.Add(new ScaleState(axis));
     }
 }
示例#2
0
 /// <summary>
 /// The Copy Constructor
 /// </summary>
 /// <param name="rhs">The <see cref="YAxisList"/> object from which to copy</param>
 public YAxisList( YAxisList rhs )
 {
     foreach ( YAxis item in rhs )
     {
         this.Add( item.Clone() );
     }
 }
示例#3
0
 /// <summary>
 /// The Copy Constructor
 /// </summary>
 /// <param name="rhs">The <see cref="YAxisList"/> object from which to copy</param>
 public YAxisList(YAxisList rhs)
 {
     foreach (YAxis item in rhs)
     {
         this.Add(item.Clone());
     }
 }
示例#4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="list"></param>
        public void ApplyScale(YAxisList list)
        {
            int count = Math.Min(list.Count, this.Count);

            for (int i = 0; i < count; i++)
            {
                this[i].ApplyScale(list[i]);
            }
        }
示例#5
0
        /*
         *                      /// <summary>
         *                      /// Indexer to access the specified <see cref="ScaleState"/> object by
         *                      /// its ordinal position in the list.
         *                      /// </summary>
         *                      /// <param name="index">The ordinal position (zero-based) of the
         *                      /// <see cref="ScaleState"/> object to be accessed.</param>
         *                      /// <value>A <see cref="ScaleState"/> object reference.</value>
         *                      public ScaleState this[ int index ]
         *                      {
         *                              get { return (ScaleState) List[index]; }
         *                              set { List[index] = value; }
         *                      }
         *                      /// <summary>
         *                      /// Add a <see cref="ScaleState"/> object to the collection at the end of the list.
         *                      /// </summary>
         *                      /// <param name="state">A reference to the <see cref="ScaleState"/> object to
         *                      /// be added</param>
         *                      /// <seealso cref="IList.Add"/>
         *                      public void Add( ScaleState state )
         *                      {
         *                              List.Add( state );
         *                      }
         */

        /// <summary>
        ///
        /// </summary>
        /// <param name="list"></param>
        public void ApplyScale(YAxisList list)
        {
            var count = Math.Min(list.Count, Count);

            for (var i = 0; i < count; i++)
            {
                this[i].ApplyScale(list[i]);
            }
        }
示例#6
0
        /// <summary>
        /// Iterate through the list of <see cref="ScaleState" /> objects, comparing them
        /// to the state of the specified <see cref="YAxisList" /> <see cref="Axis" />
        /// objects.
        /// </summary>
        /// <param name="list">A <see cref="YAxisList" /> object specifying a list of
        /// <see cref="Axis" /> objects to be compared with this <see cref="ScaleStateList" />.
        /// </param>
        /// <returns>true if a difference is found, false otherwise</returns>
        public bool IsChanged(YAxisList list)
        {
            int count = Math.Min(list.Count, this.Count);

            for (int i = 0; i < count; i++)
            {
                if (this[i].IsChanged(list[i]))
                {
                    return(true);
                }
            }

            return(false);
        }
        /// <summary>
        /// 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 GraphPane( 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" );

            _xAxis = (XAxis)info.GetValue( "xAxis", typeof( XAxis ) );
            if ( sch >= 11 )
                _x2Axis = (X2Axis)info.GetValue( "x2Axis", typeof( X2Axis ) );
            else
                _x2Axis = new X2Axis( "" );

            _yAxisList = (YAxisList)info.GetValue( "yAxisList", typeof( YAxisList ) );
            _y2AxisList = (Y2AxisList)info.GetValue( "y2AxisList", typeof( Y2AxisList ) );

            _curveList = (CurveList)info.GetValue( "curveList", typeof( CurveList ) );

            _chart = (Chart) info.GetValue( "chart", typeof( Chart ) );

            _barSettings = (BarSettings)info.GetValue( "barSettings", typeof( BarSettings ) );
            _barSettings._ownerPane = this;

            _isIgnoreInitial = info.GetBoolean( "isIgnoreInitial" );
            _isBoundedRanges = info.GetBoolean( "isBoundedRanges" );
            _isIgnoreMissing = info.GetBoolean( "isIgnoreMissing" );
            _isAlignGrids = info.GetBoolean( "isAlignGrids" );

            _lineType = (LineType)info.GetValue( "lineType", typeof( LineType ) );

            _zoomStack = new ZoomStateStack();
        }
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The GraphPane object from which to copy</param>
        public GraphPane( GraphPane rhs )
            : base(rhs)
        {
            // copy values for all the value types
            _isIgnoreInitial = rhs.IsIgnoreInitial;
            _isBoundedRanges = rhs._isBoundedRanges;
            _isAlignGrids = rhs._isAlignGrids;

            _chart = rhs._chart.Clone();

            _barSettings = new BarSettings( rhs._barSettings, this );

            _lineType = rhs.LineType;

            // copy all the reference types with deep copies
            _xAxis = new XAxis( rhs.XAxis );
            _x2Axis = new X2Axis( rhs.X2Axis );

            _yAxisList = new YAxisList( rhs._yAxisList );
            _y2AxisList = new Y2AxisList( rhs._y2AxisList );

            _curveList = new CurveList( rhs.CurveList );
            _zoomStack = new ZoomStateStack( rhs._zoomStack );
        }
        /// <summary>
        /// Constructor for the <see cref="GraphPane"/> object.  This routine will
        /// initialize all member variables and classes, setting appropriate default
        /// values as defined in the <see cref="Default"/> class.
        /// </summary>
        /// <param name="rect"> A rectangular screen area where the graph is to be displayed.
        /// This area can be any size, and can be resize at any time using the
        /// <see cref="PaneBase.Rect"/> property.
        /// </param>
        /// <param name="title">The <see cref="PaneBase.Title"/> for this <see cref="GraphPane"/></param>
        /// <param name="xTitle">The <see cref="Axis.Title"/> for the <see cref="XAxis"/></param>
        /// <param name="yTitle">The <see cref="Axis.Title"/> for the <see cref="YAxis"/></param>
        public GraphPane( RectangleF rect, string title,
			string xTitle, string yTitle )
            : base(title, rect)
        {
            _xAxis = new XAxis( xTitle );
            _x2Axis = new X2Axis( "" );

            _yAxisList = new YAxisList();
            _y2AxisList = new Y2AxisList();

            _yAxisList.Add( new YAxis( yTitle ) );
            _y2AxisList.Add( new Y2Axis( string.Empty ) );

            _curveList = new CurveList();
            _zoomStack = new ZoomStateStack();

            _isIgnoreInitial = Default.IsIgnoreInitial;
            _isBoundedRanges = Default.IsBoundedRanges;
            _isAlignGrids = false;

            _chart = new Chart();

            _barSettings = new BarSettings( this );

            _lineType = Default.LineType;
        }
示例#10
0
 /// <summary>
 /// Construct a new <see cref="ScaleStateList" /> automatically from an
 /// existing <see cref="YAxisList" />.
 /// </summary>
 /// <param name="list">The <see cref="YAxisList" /> (a list of Y axes),
 /// from which to retrieve the state and create the <see cref="ScaleState" />
 /// objects.</param>
 public ScaleStateList( YAxisList list )
 {
     foreach ( Axis axis in list )
         this.Add( new ScaleState( axis ) );
 }
示例#11
0
        /// <summary>
        /// Iterate through the list of <see cref="ScaleState" /> objects, comparing them
        /// to the state of the specified <see cref="YAxisList" /> <see cref="Axis" />
        /// objects.
        /// </summary>
        /// <param name="list">A <see cref="YAxisList" /> object specifying a list of
        /// <see cref="Axis" /> objects to be compared with this <see cref="ScaleStateList" />.
        /// </param>
        /// <returns>true if a difference is found, false otherwise</returns>
        public bool IsChanged( YAxisList list )
        {
            int count = Math.Min( list.Count, this.Count );
            for ( int i = 0; i < count; i++ )
                if ( this[i].IsChanged( list[i] ) )
                    return true;

            return false;
        }
示例#12
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="list"></param>
 public void ApplyScale( YAxisList list )
 {
     int count = Math.Min( list.Count, this.Count );
     for ( int i = 0; i < count; i++ )
         this[i].ApplyScale( list[i] );
 }
示例#13
0
		/// <summary>
		/// Constructor for the <see cref="GraphPane"/> object.  This routine will
		/// initialize all member variables and classes, setting appropriate default
		/// values as defined in the <see cref="Default"/> class.
		/// </summary>
		/// <param name="rect"> A rectangular screen area where the graph is to be displayed.
		/// This area can be any size, and can be resize at any time using the
		/// <see cref="PaneBase.Rect"/> property.
		/// </param>
		/// <param name="title">The <see cref="PaneBase.Title"/> for this <see cref="GraphPane"/></param>
		/// <param name="xTitle">The <see cref="Axis.Title"/> for the <see cref="XAxis"/></param>
		/// <param name="yTitle">The <see cref="Axis.Title"/> for the <see cref="YAxis"/></param>
		public GraphPane( RectangleF rect, string title,
			string xTitle, string yTitle )
			: base( title, rect )
		{
			_xAxis = new XAxis( xTitle );
			_x2Axis = new X2Axis( "" );

			_yAxisList = new YAxisList();
			_y2AxisList = new Y2AxisList();

			_yAxisList.Add( new YAxis( yTitle ) );
			_y2AxisList.Add( new Y2Axis( string.Empty ) );

			_curveList = new CurveList();
			_zoomStack = new ZoomStateStack();

			_isIgnoreInitial = Default.IsIgnoreInitial;
			_isBoundedRanges = Default.IsBoundedRanges;
			_isAlignGrids = false;

			_chart = new Chart();

			_barSettings = new BarSettings( this );

			_lineType = Default.LineType;
			
			m_angle = Default.Angle;			
			m_gasGaugeRegionWidth = Default.GasGaugeRegionWidth;
			m_gasGaugeBorder = Default.GasGaugeBorder;
			m_showGasGaugeValueLabel = Default.ShowGasGaugeValueLabel;
			m_clockwise = Default.Clockwise;
			m_watchAngle = Default.WatchAngle;
			m_pieHeight = Default.PieHeight;
			m_usedAngleBegin = Default.UsedAngleBegin;
			m_usedAngleEnd = Default.UsedAngleEnd;
		}