예제 #1
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The <see cref="PaneBase"/> object from which to copy</param>
        public PaneBase(PaneBase rhs)
            : base(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();
            this._graphObjList = rhs._graphObjList.Clone();

            if (rhs._tag is ICloneable)
            {
                _tag = ((ICloneable)rhs._tag).Clone();
            }
            else
            {
                _tag = rhs._tag;
            }
        }
예제 #2
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;

            this._graphObjList = new GraphObjList();

            _tag = null;
        }
예제 #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) : 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("schema");

            _rect              = (RectangleF)info.GetValue("rect", typeof(RectangleF));
            _legend            = (Legend)info.GetValue("legend", typeof(Legend));
            _title             = (GapLabel)info.GetValue("title", typeof(GapLabel));
            _isFontsScaled     = info.GetBoolean("isFontsScaled");
            _isPenWidthScaled  = info.GetBoolean("isPenWidthScaled");
            _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));
            this._graphObjList = (GraphObjList)info.GetValue("graphObjList", typeof(GraphObjList));

            _tag = info.GetValue("tag", typeof(object));
        }
예제 #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;
 }