Esempio n. 1
0
        public void FillGapTimes(IMark mark)
        {
            EnsureOrder();
            var index = Marks.IndexOf(mark);

            for (int i = index - 1; i >= 0; i--)
            {
                var time = Marks[i].EndTime;
                if (time < mark.StartTime)
                {
                    mark.StartTime = time + TimeSpan.FromMilliseconds(1);
                    break;
                }
            }

            if (index != Marks.Count - 1)
            {
                mark.Duration = Marks[index + 1].StartTime - TimeSpan.FromMilliseconds(1) - mark.StartTime;
            }
        }
Esempio n. 2
0
 public int IndexOf(TimeSpan time)
 {
     return(Marks.IndexOf(time));
 }