Пример #1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            EntryForm NewPassword = new EntryForm();

            NewPassword.ShowDialog();
            if (!NewPassword.EntryCreatedOrEdited)
            {
                return;
            }
            AddEntry(NewPassword.Entry);
            IsSaved = false;
            UpdateNameList();
        }
Пример #2
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            int       index         = materialListView1.SelectedIndices[0];
            EntryForm editEntryForm = new EntryForm();

            editEntryForm.ShowData(EntryList[index]);
            editEntryForm.ShowDialog();
            if (!editEntryForm.EntryCreatedOrEdited)
            {
                return;
            }
            EntryList[index] = editEntryForm.Entry;
            UpdateItem(index);
            IsSaved = false;
            UpdateNameList();
        }