/// <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 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) ); }
/// <summary> /// Default constructor for the <see c_ref="PaneBase"/> class. Specifies the <see c_ref="Title"/> of /// the <see c_ref="PaneBase"/>, and the size of the <see c_ref="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> /// The Copy Constructor /// </summary> /// <param name="rhs">The <see c_ref="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> /// 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; }