NPlot.DateTimeAxis.LargeTickLabel C# (CSharp) Метод

LargeTickLabel() защищенный Метод

Get the label corresponding to the provided date time
protected LargeTickLabel ( System.DateTime tickDate ) : string
tickDate System.DateTime the date time to get the label for
Результат string
        protected virtual string LargeTickLabel(DateTime tickDate)
        {
            string label = "";

            if (this.NumberFormat == null || this.NumberFormat == String.Empty)
            {
                if (this.LargeTickLabelType_ == LargeTickLabelType.year)
                {
                    label = tickDate.Year.ToString();
                }

                else if (this.LargeTickLabelType_ == LargeTickLabelType.month)
                {
                    label = tickDate.ToString("MMM");
                    label += " ";
                    label += tickDate.Year.ToString().Substring(2, 2);
                }

                else if (this.LargeTickLabelType_ == LargeTickLabelType.day)
                {
                    label = (tickDate.Day).ToString();
                    label += " ";
                    label += tickDate.ToString("MMM");
                }

                else if (this.LargeTickLabelType_ == LargeTickLabelType.hourMinute)
                {
                    string minutes = tickDate.Minute.ToString();
                    if (minutes.Length == 1)
                    {
                        minutes = "0" + minutes;
                    }
                    label = tickDate.Hour.ToString() + ":" + minutes;
                }
                else if (this.LargeTickLabelType_ == LargeTickLabelType.hourMinuteSeconds)
                {
                    string minutes = tickDate.Minute.ToString();
                    string seconds = tickDate.Second.ToString();
                    if (seconds.Length == 1)
                    {
                        seconds = "0" + seconds;
                    }

                    if (minutes.Length == 1)
                    {
                        minutes = "0" + minutes;
                    }
                    label = tickDate.Hour.ToString() + ":" + minutes + "." + seconds;
                }
            }
            else
            {
                label = tickDate.ToString(NumberFormat);
            }

            return label;
        }