示例#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);
 }