예제 #1
0
        private void SiteEdit(ListViewItem item)
        {
            PasswordSite frm = new PasswordSite();

            string title = item.Text;


            string link = item.SubItems[1].Text;

            string user     = item.SubItems[2].Text;
            string password = item.Tag.ToString();

            string description = item.SubItems[4].Text;

            frm.InitData(title, link, user, password, description);

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                item.Text = frm.Title;

                item.SubItems[1].Text = frm.Link;
                item.SubItems[2].Text = frm.User;
                item.SubItems[3].Text = "******";
                item.Tag = frm.Password;
                item.SubItems[4].Text = frm.Description;

                this.save();
            }
        }
예제 #2
0
        private void tsbNew_Click(object sender, EventArgs e)
        {
            PasswordSite frm = new PasswordSite();

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                ListViewItem item = new ListViewItem(frm.Title);

                item.SubItems.Add(frm.Link);
                item.SubItems.Add(frm.User);
                item.SubItems.Add("******");
                item.SubItems.Add(frm.Description);
                item.Tag = frm.Password;

                this.lv.Items.Add(item);

                this.save();
            }
        }