Esempio n. 1
0
		/// <summary>
		/// The Copy Constructor
		/// </summary>
		/// <param name="rhs">The XAxis object from which to copy</param>
		public Legend( Legend rhs )
		{
			_rect = rhs.Rect;
			_position = rhs.Position;
			_isHStack = rhs.IsHStack;
			_isVisible = rhs.IsVisible;

			_location = rhs.Location;
			_border = rhs.Border.Clone();
			_fill = rhs.Fill.Clone();

			_fontSpec = rhs.FontSpec.Clone();

			_gap = rhs._gap;

			_isReverse = rhs._isReverse;

			_isShowLegendSymbols = rhs._isShowLegendSymbols;
		}
Esempio n. 2
0
		/// <summary>
		/// The Copy Constructor
		/// </summary>
		/// <param name="rhs">The <see cref="PaneBase"/> object from which to copy</param>
		public PaneBase( PaneBase rhs )
		{
			// copy over all the value types
			_isFontsScaled = rhs._isFontsScaled;
			_isPenWidthScaled = rhs._isPenWidthScaled;

			_titleGap = rhs._titleGap;
			_baseDimension = rhs._baseDimension;
			_margin = rhs._margin.Clone();
			_rect = rhs._rect;

			// Copy the reference types by cloning
			_fill = rhs._fill.Clone();
			_border = rhs._border.Clone();
			_title = rhs._title.Clone();

			_legend = rhs.Legend.Clone();
			_title = rhs._title.Clone();
			_graphObjList = rhs._graphObjList.Clone();
			
			if ( rhs._tag is ICloneable )
				_tag = ((ICloneable) rhs._tag).Clone();
			else
				_tag = rhs._tag;
		}
Esempio n. 3
0
		/// <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 PaneBase( 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" );

			_rect = (RectangleF) info.GetValue( "rect", typeof(RectangleF) );
			_legend = (Legend) info.GetValue( "legend", typeof(Legend) );
			_title = (GapLabel) info.GetValue( "title", typeof(GapLabel) );
			//this.isShowTitle = info.GetBoolean( "isShowTitle" );
			_isFontsScaled = info.GetBoolean( "isFontsScaled" );
			_isPenWidthScaled = info.GetBoolean( "isPenWidthScaled" );
			//this.fontSpec = (FontSpec) info.GetValue( "fontSpec" , typeof(FontSpec) );
			_titleGap = info.GetSingle( "titleGap" );
			_fill = (Fill) info.GetValue( "fill", typeof(Fill) );
			_border = (Border) info.GetValue( "border", typeof(Border) );
			_baseDimension = info.GetSingle( "baseDimension" );
			_margin = (Margin)info.GetValue( "margin", typeof( Margin ) );
			_graphObjList = (GraphObjList) info.GetValue( "graphObjList", typeof(GraphObjList) );

			_tag = info.GetValue( "tag", typeof(object) );

		}
Esempio n. 4
0
		/// <summary>
		/// Default constructor for the <see cref="PaneBase"/> class.  Specifies the <see cref="Title"/> of
		/// the <see cref="PaneBase"/>, and the size of the <see cref="Rect"/>.
		/// </summary>
		public PaneBase( string title, RectangleF paneRect )
		{
			_rect = paneRect;

			_legend = new Legend();
				
			_baseDimension = Default.BaseDimension;
			_margin = new Margin();
			_titleGap = Default.TitleGap;

			_isFontsScaled = Default.IsFontsScaled;
			_isPenWidthScaled = Default.IsPenWidthScaled;
			_fill = new Fill( Default.FillColor );
			_border = new Border( Default.IsBorderVisible, Default.BorderColor,
				Default.BorderPenWidth );

			_title = new GapLabel( title, Default.FontFamily,
				Default.FontSize, Default.FontColor, Default.FontBold,
				Default.FontItalic, Default.FontUnderline );
			_title._fontSpec.Fill.IsVisible = false;
			_title._fontSpec.Border.IsVisible = false;

			_graphObjList = new GraphObjList();
			
			_tag = null;
		}
Esempio n. 5
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The XAxis object from which to copy</param>
        public Legend( Legend rhs )
        {
            rect = rhs.Rect;
            position = rhs.Position;
            isHStack = rhs.IsHStack;
            isVisible = rhs.IsVisible;

            this.location = (Location) rhs.Location;
            this.border = (Border) rhs.Border.Clone();
            this.fill = (Fill) rhs.Fill.Clone();

            fontSpec = (FontSpec) rhs.FontSpec.Clone();
        }
Esempio n. 6
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;
        }
Esempio n. 7
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;
        }
Esempio n. 8
0
 /// <summary>
 /// Local dispose method
 /// </summary>
 /// <param name="bDisposing">if disposing is required</param>
 protected virtual void Dispose(bool bDisposing)
 {
     if (!m_bDisposed)
     {
         if (bDisposing)
         {
             if (_border != null)
             {
                 _border.Dispose();
                 _border = null;
             }
             if (_fill != null)
             {
                 _fill.Dispose();
                 _fill = null;
             }
             if (_title != null)
             {
                 _title.Dispose();
                 _title = null;
             }
             if (_legend != null)
             {
                 _legend.Dispose();
                 _legend = null;
             }
         }
         m_bDisposed = true;
     }
 }