/// <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;
            }
        }
        /// <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;
        }
        /// <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));
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="rhs">the <see cref="AxisLabel" /> instance to be copied.</param>
 public GapLabel(GapLabel rhs)
     : base(rhs)
 {
     _gap = rhs._gap;
 }
Ejemplo n.º 5
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) );

		}
Ejemplo n.º 6
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;
		}
Ejemplo n.º 7
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;
		}
Ejemplo n.º 8
0
		/// <summary>
		/// Copy constructor
		/// </summary>
		/// <param name="rhs">the <see cref="AxisLabel" /> instance to be copied.</param>
		public GapLabel( GapLabel rhs )
			: base( rhs )
		{
			_gap = rhs._gap;
		}
Ejemplo n.º 9
0
 public ClickableLabel(GapLabel rhs) : base(rhs)
 {
 }
Ejemplo n.º 10
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;
     }
 }