Example #1
0
            void GoUp(ref double newValue)
            {
                switch (selectedComponent)
                {
                case Component.Second:
                    newValue += TimeSpan.TicksPerSecond;
                    break;

                case Component.Minute:
                    newValue += TimeSpan.TicksPerMinute;
                    break;

                case Component.Hour:
                    newValue += TimeSpan.TicksPerHour;
                    break;

                case Component.Day:
                    newValue = CurrentValue.AddDays(1).Ticks;
                    break;

                case Component.Month:
                    newValue = CurrentValue.AddMonths(1).Ticks;
                    break;

                case Component.Year:
                    newValue = CurrentValue.AddYears(1).Ticks;
                    break;
                }
            }