예제 #1
0
        private List <ILineInfo> FormLinesList(string[] fileLines)
        {
            int lineCounter = 1;
            var lines       = new List <ILineInfo>(fileLines.Length);

            if (fileLines != null)
            {
                for (int i = 0; i < fileLines.Length;)
                {
                    ILineInfo linfo = new Mpl2LineInfo();
                    while (i < fileLines.Length && (fileLines[i] == "" || fileLines[i] == Environment.NewLine))
                    {
                        i++;
                    }
                    if (i == fileLines.Length)
                    {
                        break;
                    }
                    if (fileLines[i].Length != 0)
                    {
                        linfo.LineNumber = lineCounter++;
                        AssignTimeProperies(fileLines[i], ref linfo);
                        int index = GetIndexOfLastTimecodeChar(fileLines[i]);
                        linfo.Line = fileLines[i++].Trim().Substring(index + 1).Trim();
                        lines.Add(linfo);
                    }
                }
            }
            return(lines);
        }
예제 #2
0
 public void Setup()
 {
     lineInfo = new Mpl2LineInfo();
 }