static void RecordingMethod() { int count = 0; bool isExit = false; while (!isExit) { HowWrite howWrite = new HowWrite(); Console.WriteLine("Выберете, как сохранять данные: \n 1.В отдельных файлах. \n 2.В одном файле."); int variant = int.Parse(Console.ReadLine()); howWrite = (HowWrite)variant; count = Notes.Variant(howWrite, count); isExit = Notes.NewNote(isExit); } }
public static int Variant(HowWrite howWrite, int count) { switch (howWrite) { case HowWrite.ManyFiles: count = DifferentFiles(count); break; case HowWrite.OneFile: WriteInOneFile(); break; default: Console.WriteLine("Выбран несуществующий вариант!"); break; } return(count); }