Exemple #1
0
        /// <summary>
        /// Creates a new note item and associates the action events with the specified NoteForm.
        /// </summary>
        public NoteItem(NoteForm form, Task relatedTask) : this()
        {
            NewNoteRequest += form.AddNote;
            DeleteNoteRequest += form.DeleteNote;
            RelatedTask = relatedTask;

            if (relatedTask != null)
            {
                // Use data from the related task.
                NoteText = relatedTask.Title;
                NoteFinished = relatedTask.Status == "completed";
            }
        }
Exemple #2
0
        /// <summary>
        /// Creates a new note item and associates the action events with the specified NoteForm.
        /// </summary>
        public NoteItem(NoteForm form, Task relatedTask) : this()
        {
            NewNoteRequest    += form.AddNote;
            DeleteNoteRequest += form.DeleteNote;
            RelatedTask        = relatedTask;

            if (relatedTask != null)
            {
                // Use data from the related task.
                NoteText     = relatedTask.Title;
                NoteFinished = relatedTask.Status == "completed";
            }
        }