Exemplo n.º 1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            NoteForm NewPassword = new NoteForm(new Entry());

            NewPassword.ShowDialog();
            if (NewPassword.EntryCreatedOrEdited)
            {
                changeSavedStatus(false);
                AddEntry(NewPassword.entry);
                UpdateNameList();
            }
        }
Exemplo n.º 2
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            int      index         = listView.SelectedIndices[0];
            NoteForm editEntryForm = new NoteForm(new Entry());

            editEntryForm.ShowData(EntryList[index]);
            editEntryForm.ShowDialog();
            if (editEntryForm.EntryCreatedOrEdited)
            {
                changeSavedStatus(false);
                EntryList[index] = editEntryForm.entry;
                UpdateEntry(index);
                UpdateNameList();
            }
        }