Ejemplo n.º 1
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            SharePasswords sharePasswords = new SharePasswords();

            if (ShareUSer.Text != "")
            {
                sharePasswords.Consumer = ShareUSer.Text;
                shareUser = ShareUSer.Text;
                this.Close();
            }
        }
Ejemplo n.º 2
0
        private void btnShare_Click(object sender, EventArgs e)
        {
            DateTime       currentTime    = DateTime.Now;
            String         title          = listView1.SelectedItems[0].SubItems[0].Text;
            String         login          = listView1.SelectedItems[0].SubItems[1].Text;
            String         password       = listView1.SelectedItems[0].SubItems[2].Text;
            String         descrpition    = listView1.SelectedItems[0].SubItems[3].Text;
            String         webAddress     = listView1.SelectedItems[0].SubItems[4].Text;
            SharePasswords sharePasswords = new SharePasswords();
            ShareForm      shareForm      = new ShareForm();

            shareForm.ShowDialog();
            sharePasswords.AddPassword(Files.filePath, login, password, webAddress, descrpition, currentTime, ShareForm.shareUser, false, title);
            /* sharePasswords.UpdatePassword();*/
        }
Ejemplo n.º 3
0
        private void MainWindow_Load(object sender, EventArgs e)
        {
            DataBase dataBase = new DataBase();

            dataBase.GetPasswords(Files.filePath);
            for (int i = 0; i < dataBase.list.Count; i++)
            {
                listView1.Items.Add(dataBase.list[i]);
            }
            SharePasswords sharePasswords = new SharePasswords();

            sharePasswords.CreateDataBaseShare(Files.filePath);
            sharePasswords.GetSharedPasswords(Files.filePath);
            for (int i = 0; i < sharePasswords.shareList.Count; i++)
            {
                sharedListview.Items.Add(sharePasswords.shareList[i]);
            }
        }