static string ConvertTimeSpanToString(TimeSpan timeSpan)
 {
     if (timeSpan.Ticks < 0L)
     {
         string str = HumanReadableTimeSpanHelper.ToString(timeSpan);
         return(string.Format(SchedulerLocalizer.GetString(SchedulerStringId.Format_TimeBeforeStart), str));
     }
     return(HumanReadableTimeSpanHelper.ToString(timeSpan));
 }
        void OnCbReminderEditValueChanging(object sender, ChangingEventArgs e)
        {
            if (e.NewValue is TimeSpan)
            {
                return;
            }
            string   stringValue = e.NewValue as String;
            TimeSpan duration    = HumanReadableTimeSpanHelper.Parse(stringValue);

            if (duration.Ticks < 0)
            {
                e.NewValue = TimeSpan.FromTicks(0);
            }
        }