示例#1
0
        private void editNoteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddEditForm EditForm = new AddEditForm();
            int         EditInd  = NoteList.SelectedIndices[0];

            EditForm.NoteView(_noteList.Notes[EditInd]);
            if (EditForm.ShowDialog() == DialogResult.OK)
            {
                _noteList.Notes.RemoveAt(EditInd);
                NoteList.Items[EditInd].Remove();
                _noteList.Notes.Insert(EditInd, EditForm._noteContainer);
                FillListView(_noteList.Notes);
                SaveFile(_noteList);
            }
        }
示例#2
0
 private void editNoteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (NoteList.SelectedIndices.Count != 0)
     {
         int EditInd = (CategoriesComboBox.Text == "All") ? NoteList.SelectedIndices[0]
             : GetNoteIndex(_noteList.Notes, _projectForFind.Notes);
         AddEditForm EditForm = new AddEditForm();
         EditForm.NoteView(_noteList.Notes[EditInd]);
         if (EditForm.ShowDialog() == DialogResult.OK)
         {
             FillListView(_noteList.Notes);
             _noteList.Notes.RemoveAt(EditInd);
             NoteList.Items[EditInd].Remove();
             _noteList.Notes.Insert(EditInd, EditForm._noteContainer);
             SaveFile(_noteList);
             FilldListCategory();
         }
     }
 }