示例#1
0
 private void InFolderOrFile()
 {
     SendMessage("Enter name folder of file");
     while (true)
     {
         AnswerClient();
         var(allDirectoriesAndFiles, directoryOrFileFount) = manager.InFolderOrFile(data.ToString());
         if (directoryOrFileFount)
         {
             SendMessage($"{allDirectoriesAndFiles}If you want to select a different folder or file, click C else if you want return to previous folder click P");
             return;
         }
         else if (allDirectoriesAndFiles == "Redact" && directoryOrFileFount == false)
         {
             ReadAndSendFile();
             manager.SaveFile(data.ToString());
             BackFolder(false);
             return;
         }
         else if (allDirectoriesAndFiles == "PathTooLongException" && directoryOrFileFount == false)
         {
             SendMessage($"Name is too long name, write less");
         }
         else if (allDirectoriesAndFiles == "ArgumentException" && directoryOrFileFount == false)
         {
             SendMessage($"Bed input {data.ToString()}, try again");
         }
         else
         {
             SendMessage(allDirectoriesAndFiles);
         }
     }
 }