public override void set(int index, string value) { TimeSpan ts = new TimeSpan(); if (TimeSpan.TryParse(value, out ts)) { BasicTime.checkTimeSpanToTime(ts); base.set(index, new BasicInt(Utils.countMilliseconds(ts))); return; } base.set(index, value); }
public override void add(object value) { if (value is TimeSpan) { BasicTime.checkTimeSpanToTime((TimeSpan)value); base.add(Utils.countMilliseconds((TimeSpan)value)); } else if (value is DateTime) { base.add(Utils.countMilliseconds(((DateTime)value).TimeOfDay)); } else { base.add(value); } }
public virtual void setTime(int index, TimeSpan time) { BasicTime.checkTimeSpanToTime(time); setInt(index, (int)Utils.countMilliseconds(time.Hours, time.Minutes, time.Seconds, time.Milliseconds)); }