Beispiel #1
0
        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;
            }
        }
Beispiel #2
0
        private void LoadAccounts()
        {
            AccountView.Nodes.Clear();

            foreach (Account x in Accounts)
            {
                TreeNode node = new TreeNode(_encrypt.Decrypt(Encryption.ToInsecureString(Key), x.Name()));
                node.Nodes.Add("Логин: ");
                node.Nodes.Add("Пароль: ");
                AccountView.Nodes.Add(node);
            }

            txtSearch.Clear();
            this.Text = string.Format("Пароли [{0} аккаунтов]", Accounts.Count);

            AccountView.Sort();
        }