예제 #1
0
파일: Memory.cs 프로젝트: vladkabat/oopcurs
 //ВЫБОР КАК БУДЕМ РАБТАТЬ(КОНСОЛЬ, БИНАРНЫЙ, ТЕКСТОВЫЙ)
 public void MyMemoryChange()
 {
     menu.FileRespository();
     int h = int.Parse(Console.ReadLine());
     Console.Clear();
     switch (h)
     {
         case 1:
             {
                 method = console;
                 list = cons;
             }
             break;
         case 2:
             {
                 endPathText = pathText;
                 pathText = method.AddNewFile(".csv",flist, endPathText, pathText, text);
                 text = new TextFile(pathText);
                 list = flist;
                 method = text;
             }
             break;
         case 3:
             {
                 endPathBinary = pathBinary;
                 pathBinary = method.AddNewFile(".dat", flist, endPathBinary, pathBinary, binary);
                 binary = new BinaryFile(pathBinary);
                 method = binary;
                 list = flist;
             }
             break;
     }
 }