Exemplo n.º 1
0
        public void DisplayNotes()
        {
            if (notes.Count == 0)
            {
                Console.WriteLine("No notes yet");
            }

            NoteDisplayer displayer = new NoteDisplayer();

            foreach (var note in notes)
            {
                displayer.DisplayMainInfo(note);
            }
        }
Exemplo n.º 2
0
        public void DisplayListNotes()
        {
            if (notes.Count == 0)
            {
                Console.WriteLine("No list notes yet");
            }

            NoteDisplayer displayer = new NoteDisplayer();

            foreach (var note in notes)
            {
                if (note is IListNote)
                {
                    displayer.DisplayFullList((IListNote)note);
                }
            }
        }
Exemplo n.º 3
0
        public void DisplayRecentNotsNote(DateTime borderDate)
        {
            NoteDisplayer displayer = new NoteDisplayer();
            bool          displayed = false;

            foreach (var note in notes)
            {
                if (note.CreationDate > borderDate)
                {
                    displayed = true;
                    displayer.DisplayMainInfo(note);
                }
            }

            if (!displayed)
            {
                Console.WriteLine("No notes yet");
            }
        }