private void BtnLoadFileClick(object sender, RoutedEventArgs e) { var ofd = new OpenFileDialog(); ofd.Filter = "Text Files (*.txt)|*.*"; var result = ofd.ShowDialog(); if (result == true) { var file = ofd.FileName; if (File.Exists(file)) { var logins = Utils.GetLogins(file); Checker.AddLogins(logins); if (logins.Any()) { _startButton.IsEnabled = true; } _checkedLabel.Content = string.Format( "Checked: {0}/{1}", Checker.AccountsChecked.Count, Checker.AccountsToCheck.Count); } } }