예제 #1
0
파일: Axis.cs 프로젝트: tu-tran/FareLiz
        /// <summary>
        /// Initializes a new instance of the <see cref="Axis"/> class. 
        /// 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 Axis(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");

            this._cross = info.GetDouble("cross");
            this._crossAuto = info.GetBoolean("crossAuto");

            this._majorTic = (MajorTic)info.GetValue("MajorTic", typeof(MajorTic));
            this._minorTic = (MinorTic)info.GetValue("MinorTic", typeof(MinorTic));
            this._majorGrid = (MajorGrid)info.GetValue("majorGrid", typeof(MajorGrid));
            this._minorGrid = (MinorGrid)info.GetValue("minorGrid", typeof(MinorGrid));

            this._isVisible = info.GetBoolean("isVisible");

            this._title = (AxisLabel)info.GetValue("title", typeof(AxisLabel));

            this._minSpace = info.GetSingle("minSpace");

            this._color = (Color)info.GetValue("color", typeof(Color));

            this._isAxisSegmentVisible = info.GetBoolean("isAxisSegmentVisible");

            this._axisGap = info.GetSingle("axisGap");

            this._scale = (Scale)info.GetValue("scale", typeof(Scale));
            this._scale._ownerAxis = this;
        }
예제 #2
0
파일: Axis.cs 프로젝트: tu-tran/FareLiz
        /// <summary>
        /// Initializes a new instance of the <see cref="Axis"/> class. Default constructor for <see cref="Axis"/> that sets all axis properties to default values as defined in the <see cref="Default"/> class.
        /// </summary>
        public Axis()
        {
            this._scale = new LinearScale(this);

            this._cross = 0.0;

            this._crossAuto = true;

            this._majorTic = new MajorTic();
            this._minorTic = new MinorTic();

            this._majorGrid = new MajorGrid();
            this._minorGrid = new MinorGrid();

            this._axisGap = Default.AxisGap;

            this._minSpace = Default.MinSpace;
            this._isVisible = true;

            this._isAxisSegmentVisible = Default.IsAxisSegmentVisible;

            this._title = new AxisLabel(
                string.Empty,
                Default.TitleFontFamily,
                Default.TitleFontSize,
                Default.TitleFontColor,
                Default.TitleFontBold,
                Default.TitleFontUnderline,
                Default.TitleFontItalic);
            this._title.FontSpec.Fill = new Fill(Default.TitleFillColor, Default.TitleFillBrush, Default.TitleFillType);

            this._title.FontSpec.Border.IsVisible = false;

            this._color = Default.Color;
        }
예제 #3
0
파일: Axis.cs 프로젝트: tu-tran/FareLiz
        /// <summary>
        /// Initializes a new instance of the <see cref="Axis"/> class. 
        /// The Copy Constructor.
        /// </summary>
        /// <param name="rhs">
        /// The Axis object from which to copy
        /// </param>
        public Axis(Axis rhs)
        {
            this._scale = rhs._scale.Clone(this);

            this._cross = rhs._cross;

            this._crossAuto = rhs._crossAuto;

            this._majorTic = rhs.MajorTic.Clone();
            this._minorTic = rhs.MinorTic.Clone();

            this._majorGrid = rhs._majorGrid.Clone();
            this._minorGrid = rhs._minorGrid.Clone();

            this._isVisible = rhs.IsVisible;

            this._isAxisSegmentVisible = rhs._isAxisSegmentVisible;

            this._title = rhs.Title.Clone();

            this._axisGap = rhs._axisGap;

            this._minSpace = rhs.MinSpace;

            this._color = rhs.Color;
        }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AxisLabel"/> class. 
 /// Copy constructor
 /// </summary>
 /// <param name="rhs">
 /// the <see cref="AxisLabel"/> instance to be copied.
 /// </param>
 public AxisLabel(AxisLabel rhs)
     : base(rhs)
 {
     this._isOmitMag = rhs._isOmitMag;
     this._isTitleAtCross = rhs._isTitleAtCross;
 }