/// <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 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();
        }
Пример #3
0
 /// <summary>
 /// The Copy Constructor
 /// </summary>
 /// <param name="rhs">The XAxis object from which to copy</param>
 public XAxis(XAxis rhs)
     : base(rhs)
 {
 }
        /// <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;
        }
Пример #5
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;
		}
Пример #6
0
 /// <summary>
 /// Local dispose method
 /// </summary>
 /// <param name="bDisposing">if disposing is required</param>
 override protected void Dispose(bool bDisposing)
 {
     if (!m_bDisposed)
     {
         if (bDisposing)
         {
             if (_chart != null)
             {
                 _chart.Dispose();
                 _chart = null;
             }
             if (_fill != null)
             {
                 _fill.Dispose();
                 _fill = null;
             }
             if (_legend != null)
             {
                 _legend.Dispose();
                 _legend = null;
             }
             if (_x2Axis != null)
             {
                 _x2Axis.Dispose();
                 _x2Axis = null;
             }
             if (_xAxis != null)
             {
                 _xAxis.Dispose();
                 _xAxis = null;
             }
         }
         base.Dispose(bDisposing);
         m_bDisposed = true;
     }
 }
Пример #7
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The GraphPane object from which to copy</param>
        public GraphPane( GraphPane rhs )
        {
            paneRect = rhs.PaneRect;
            xAxis = new XAxis( rhs.XAxis );
            yAxis = new YAxis( rhs.YAxis );
            y2Axis = new Y2Axis( rhs.Y2Axis );
            legend = new Legend( rhs.Legend);
            curveList = new CurveList( rhs.CurveList );
            graphItemList = new GraphItemList( rhs.GraphItemList );

            this.title = rhs.Title;
            this.isShowTitle = rhs.IsShowTitle;
            this.fontSpec = (FontSpec) rhs.FontSpec.Clone();

            this.isIgnoreInitial = rhs.IsIgnoreInitial;

            this.paneBorder = (Border) rhs.PaneBorder.Clone();
            this.paneFill = (Fill) rhs.PaneFill.Clone();

            this.isAxisRectAuto = rhs.IsAxisRectAuto;
            this.axisBorder = (Border) rhs.AxisBorder.Clone();
            this.axisFill = (Fill) rhs.AxisFill.Clone();

            this.baseDimension = rhs.BaseDimension;
            this.isFontsScaled = rhs.isFontsScaled;
            this.isPenWidthScaled = rhs.isPenWidthScaled;
            this.paneGap = rhs.PaneGap;
            this.minClusterGap = rhs.MinClusterGap;
            this.minBarGap = rhs.MinBarGap;
            this.clusterScaleWidth = rhs.ClusterScaleWidth;
            this.barBase = rhs.BarBase;
            this.barType = rhs.BarType;
        }
Пример #8
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="paneRect"> 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="PaneRect"/> property.
        /// </param>
        /// <param name="paneTitle">The <see cref="Axis.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 paneRect, string paneTitle,
			string xTitle, string yTitle )
        {
            this.paneRect = paneRect;

            xAxis = new XAxis( xTitle );
            yAxis = new YAxis( yTitle );
            y2Axis = new Y2Axis( "" );
            legend = new Legend();
            curveList = new CurveList();
            graphItemList = new GraphItemList();

            this.title = paneTitle;
            this.isShowTitle = Default.IsShowTitle;
            this.fontSpec = new FontSpec( Default.FontFamily,
                Default.FontSize, Default.FontColor, Default.FontBold,
                Default.FontItalic, Default.FontUnderline,
                Default.FontFillColor, Default.FontFillBrush,
                Default.FontFillType );
            this.fontSpec.Border.IsVisible = false;

            this.isIgnoreInitial = Default.IsIgnoreInitial;

            this.paneBorder = new Border( Default.IsPaneBorderVisible, Default.PaneBorderColor, Default.PaneBorderPenWidth );
            this.paneFill = new Fill( Default.PaneBackColor, Default.PaneBackBrush, Default.PaneBackType );

            this.isAxisRectAuto = true;
            this.axisBorder = new Border( Default.IsAxisBorderVisible, Default.AxisBorderColor, Default.AxisBorderPenWidth );
            this.axisFill = new Fill( Default.AxisBackColor, Default.AxisBackBrush, Default.AxisBackType );

            this.baseDimension = Default.BaseDimension;
            this.paneGap = Default.PaneGap;
            this.isFontsScaled = true;
            this.isPenWidthScaled = Default.IsPenWidthScaled;

            this.minClusterGap = Default.MinClusterGap;
            this.minBarGap = Default.MinBarGap;
            this.clusterScaleWidth = Default.ClusterScaleWidth;
            this.barBase = Default.BarBase;
            this.barType = Default.BarType;
        }
Пример #9
0
 /// <summary>
 /// The Copy Constructor
 /// </summary>
 /// <param name="rhs">The XAxis object from which to copy</param>
 public XAxis(XAxis rhs) : base(rhs)
 {
 }