private void LoadAccounts() { AccountView.Rows.Clear(); AccountView.Refresh(); if (Options.CurrentOptions.HidePasswords) { AccountView.Columns[2].Visible = false; } else { AccountView.Columns[2].Visible = true; } foreach (LainAccount x in Accounts) { AccountView.Rows.Add(new string[] { _cryLain.Decrypt(CryLain.ToInsecureString(Key), x.Name()), _cryLain.Decrypt(CryLain.ToInsecureString(Key), x.Email()), _cryLain.Decrypt(CryLain.ToInsecureString(Key), x.Password()) }); } txtSearch.Clear(); this.Text = string.Format("Lain {0} [{1} accounts]", Program.GetCurrentVersionToString(), Accounts.Count); AccountView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells); AccountView.Sort(AccountView.Columns[0], ListSortDirection.Ascending); if (AccountView.Rows.Count > 0) { AccountView.ClearSelection(); AccountView.Rows[0].Selected = true; } }