示例#1
0
        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);
        }
示例#2
0
 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);
     }
 }
示例#3
0
 public virtual void setTime(int index, TimeSpan time)
 {
     BasicTime.checkTimeSpanToTime(time);
     setInt(index, (int)Utils.countMilliseconds(time.Hours, time.Minutes, time.Seconds, time.Milliseconds));
 }