Пример #1
0
 public void AddLineAt(int index, Lrc line)
 {
     if (index < 0 || index > lrcList.Count)
     {
         return;
     }
     lrcList.Insert(index, line);
 }
Пример #2
0
 public void LoadFromStringWithoutTime(string content)
 {
     Clear();
     string[] list = content.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
     foreach (string temp in list)
     {
         Lrc l = new Lrc("[00:00.000]" + temp);
         lrcList.Add(l);
     }
 }
Пример #3
0
        public void MoveLineDown(int index)
        {
            if (index < 0 || index >= lrcList.Count - 1)
            {
                return;
            }
            Lrc temp = GetLineAt(index);

            RemoveLineAt(index);
            AddLineAt(index + 1, temp);
        }
Пример #4
0
        public void MoveLineUp(int index)
        {
            if (index <= 0 || index >= lrcList.Count)
            {
                return;
            }
            Lrc temp = GetLineAt(index);

            RemoveLineAt(index);
            AddLineAt(index - 1, temp);
        }
Пример #5
0
        /// <summary>
        /// 用于按时间排列的参考依据
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public int CompareTo(object obj)
        {
            Lrc o = (Lrc)obj;

            if (ActualTime > o.ActualTime)
            {
                return(1);
            }
            else if (ActualTime.TotalSeconds == o.ActualTime.TotalSeconds)
            {
                return(0);
            }
            else
            {
                return(-1);
            }
        }
Пример #6
0
 public void AddLine(Lrc line)
 {
     lrcList.Add(line);
 }