예제 #1
0
        public override LabelProviderBase <DateTime> Clone()
        {
            DateTimeLabelProvider lp = base.Clone() as DateTimeLabelProvider;

            allocatedCount = 0;
            allocatedFrameworkElementList = new List <FrameworkElement>();
            allocatedTextBlocksList       = new List <TextBlock>();
            return(lp);
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DateTimeAxisControl"/> class.
        /// </summary>
        public DateTimeAxisControl()
        {
            LabelProvider      = new DateTimeLabelProvider();
            TicksProvider      = new DateTimeTicksProvider();
            MayorLabelProvider = new MayorDateTimeLabelProvider();
            //this.DrawMinorTicks = false;
            ConvertToDouble = dt => dt.Ticks;

            Range = new Range <DateTime>(DateTime.Now, DateTime.Now.AddYears(1));
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="DateTimeAxisControl"/> class.
        /// </summary>
        public DateTimeAxisControl()
        {
            LabelProvider      = new DateTimeLabelProvider();
            TicksProvider      = new DateTimeTicksProvider();
            MajorLabelProvider = new MajorDateTimeLabelProvider();

            ConvertToDouble = dt => dt.Ticks;

            Range = new Range <DateTime>(DateTime.Now, DateTime.Now.AddYears(1));
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="DateTimeAxisControl"/> class.
        /// </summary>
        public DateTimeAxisControl()
        {
            LabelProvider      = new DateTimeLabelProvider();
            TicksProvider      = new DateTimeTicksProvider();
            MajorLabelProvider = new MajorDateTimeLabelProvider();

            ConvertToDouble   = dt => dt.Ticks;
            ConvertFromDouble = d =>
            {
                if (d < 0)
                {
                    d = 0;
                }
                return(new DateTime((long)d));
            };

            Range = new Range <DateTime>(DateTime.Now, DateTime.Now.AddYears(1));
        }