Ejemplo n.º 1
0
        /// <summary>
        /// This method is responsible for adding a note and it's data(text)
        /// after an AddNote button is clicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddNote_Click(object sender, EventArgs e)
        {
            //CREATE a new note
            _newNote = new FishyNote(_fishyNoteID, Remove, _noteTextData.UpdateNoteText, _noteTextData.RetriveNoteText);

            //ADD am empty text field to the NoteText dictionary
            _noteData.AddNoteText(_fishyNoteID);

            //ADD a note to the dictionary of notes
            _noteForms.Add(_fishyNoteID, _newNote);

            //display the note
            _noteForms[_fishyNoteID].Show();

            //increment id
            _fishyNoteID++;
        }