Beispiel #1
0
        private void LoadUser()
        {
            User user = new User();
            List<User> listUser = user.GetAll();

            Security security = new Security();

            lvUsers.Items.Clear();

            foreach (User usr in listUser)
            {
                ListViewItem item = new ListViewItem(new[] { usr.UserName, usr.Email, security.encrypt(User.Current.PublicKey, usr.Password), usr.PublicKey, usr.PrivateKey });
                lvUsers.Items.Add(item);
            }
        }
Beispiel #2
0
        private void LoadConnection()
        {
            Connection connection = new Connection();
            Security security = new Security();
            List<Connection> lstConnection = connection.GetAll();

            lvConnections.Items.Clear();

            foreach (Connection conn in lstConnection)
            {
                ListViewItem item = new ListViewItem(new[] { conn.Name, conn.Server, conn.Database, conn.Username, security.encrypt(User.Current.PublicKey, conn.Password), conn.Provider });
                lvConnections.Items.Add(item);
            }
        }
Beispiel #3
0
        private void LoadMail()
        {
            MailServer mailserver = new MailServer();
            List<MailServer> lstMail = mailserver.GetAll();

            Security security = new Security();

            lvMails.Items.Clear();

            foreach(MailServer m in lstMail)
            {
                ListViewItem item = new ListViewItem(new[] { m.Name, m.Server, m.Username, security.encrypt(User.Current.PublicKey, m.Password), m.Port.ToString() });
                lvMails.Items.Add(item);
            }
        }
Beispiel #4
0
        private void LoadAccount()
        {
            Account account = new Account();
            List<Account> lstAccount = new List<Account>();
            lstAccount = account.GetAll();

            lvAccounts.Items.Clear();
            Security security = new Security();

            foreach (Account acc in lstAccount)
            {
                ListViewItem item = new ListViewItem(new[] { acc.Name, acc.Username, security.encrypt(User.Current.PublicKey, acc.Password), acc.Description });
                lvAccounts.Items.Add(item);
            }
        }