Пример #1
0
 private void ResetSubstrings()
 {
     _substrings = new ColoredSubstringList(new ColoredSubstring(0, _fileContents.Length));
         // Reset the colored substring list
     Search(CompiledRegexes.URL, ConsoleColor.Blue, ConsoleColor.Black);
     Search(CompiledRegexes.Date, ConsoleColor.Red, ConsoleColor.Black);
 }
Пример #2
0
        /// <summary>
        /// Instantiate the program.
        /// </summary>
        /// <param name="filepath"></param>
        public Program(String filepath)
        {
            _parser = new Parser();
            _fileContents = TextFileReader.ReadFile(filepath);

            _substrings = new ColoredSubstringList(new ColoredSubstring(0, _fileContents.Length));
            Start();
        }