void RefreshCredentials() { this.LoadHotkeys(); this.LoadUserCredentials(); LoadCredentialsFromSQLServer(); SelectedCredentials.Logins = LoginsViewModel.StringArrayToCollectionView((from i in Credentials select i.Login).Distinct().ToArray <string>()); SelectedCredentials.Passwords = LoginsViewModel.StringArrayToCollectionView((from i in Credentials select i.Password).Distinct().ToArray <string>()); }
private void LoadDBBW_DoWork(object sender, DoWorkEventArgs e) { this.Log("Загрузка базы ТТ...", false, false, string.Empty, true); try { this.LoadDBFromSQLServer(settings.Fields.ConnectionString); if (this.LoadCredentialsFromSQLServer(settings.Fields.ConnectionString)) { this.SelectedCredentials.Logins = LoginsViewModel.StringArrayToCollectionView((from s in Credentials select s.Login).Distinct <string>().ToArray <string>()); //this.PasswordsMenu = this.EnumPasswordsMenu(); } this.macvendors = System.IO.File.ReadAllLines(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"SupportTools\mac.dat")); //if (System.IO.File.Exists(pilot_sbr_file)) //{ // pilot_sbr = System.IO.File.ReadAllLines(pilot_sbr_file); //} //if (System.IO.File.Exists(pilot_flora_file)) //{ // pilot_flora = System.IO.File.ReadAllLines(pilot_flora_file); //} //if (System.IO.File.Exists(pilot_bio_file)) //{ // pilot_bio = System.IO.File.ReadAllLines(pilot_bio_file); //} //if (System.IO.File.Exists(pilot_zlock_file)) //{ // pilot_zlock = System.IO.File.ReadAllLines(pilot_zlock_file); //} this.Log("Загружена БД от " + this.DBVersion.ToString(), false, true, "", false); Bindings.dbversion = this.DBVersion.ToString(); this.SendLogs(); //this.InitFilteredTT(); } catch (Exception exception) { this.Error(exception.Message, "Ошибка при загрузке БД", exception.StackTrace); } }