Пример #1
0
 public void JustParseNames()
 {
     try
     {
         Names = FileParser.ParseFile();
     }
     catch (IndexOutOfRangeException)
     {
         Console.WriteLine("You have not designated a file to parse");
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Пример #2
0
 public void DoSortingWork()
 {
     try
     {
         Names = FileParser.ParseFile();
         NameSorter.SortNames(this.Names);
         FileWriter.WriteFile(this.Names);
     }
     catch (IndexOutOfRangeException)
     {
         Console.WriteLine("You have not designated a file to parse");
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Пример #3
0
 public SorterProgram(String fileName)
 {
     FileParser = new FileParser(fileName);
     FileWriter = new FileWriter(fileName);
     NameSorter = new NameSorter();
 }