//*************************************************************************** // Event Handlers // private void cmdAddNote_onClick(object sender, EventArgs e) { using (frmProjectNote frm = new frmProjectNote()) if (frm.ShowDialog(this) == DialogResult.OK) { string noteKey = DateTime.Now.ToString("yyyyMMddHHmmss"); this._noteCol.Add(frm.Note, noteKey); this._newNotes.Add(noteKey); this.PopulateNoteList(); } }
private void lvwNotes_onDoubleClick(object sender, EventArgs e) { if (this.lvwNotes.SelectedIndices.Count > 0) { ProjectNote note = this._noteCol[this.lvwNotes.SelectedIndices[0]]; using (frmProjectNote frm = new frmProjectNote(note.Subject, note.Body)) if (frm.ShowDialog(this) == DialogResult.OK) { if (frm.Subject != note.Subject || frm.Body != note.Body) { this._noteCol[this.lvwNotes.SelectedIndices[0]] = frm.Note; this.PopulateNoteList(); } } } }