Beispiel #1
0
        public static void AddLogin(LoginData login)
        {
            if (AccountsToCheck.Any(account => account.Username == login.Username))
            {
                return; // Account already exists
            }

            if (AccountsChecked.Any(account => account.Username == login.Username))
            {
                return; // Account already checked
            }

            AccountsToCheck.Add(login);
        }
Beispiel #2
0
        public static async void Start()
        {
            if (IsChecking)
            {
                return;
            }

            IsChecking = true;

            foreach (var account in AccountsToCheck.Where(a => AccountsChecked.All(c => c.Username != a.Username)))
            {
                var client = new Client(SelectedRegion, account.Username, account.Password);
                await client.IsCompleted.Task;
                var data = client.Data;
                AccountsChecked.Add(data);

                ReportNewAccount(data);
            }

            IsChecking = false;
        }