Exemplo n.º 1
0
        public void NewNote(NoteType type)
        {
            INote note = null;

            if (type == NoteType.RichText)
            {
                note = factory.CreateRichTextNote();
            }
            else if (type == NoteType.ToDo)
            {
                note = factory.CreateToDoListNote();
            }
            else
            {
                throw new NotImplementedException("Note type not implemented.");
            }

            repository.AddOrUpdate(note);
            OnNoteAdded(note);
        }