Example #1
0
        private async void AddNote(object sender, RoutedEventArgs e)
        {
            var id = Guid.NewGuid().ToString("N");
            await _controller.AddNote(new Note
            {
                Id     = id,
                Color  = new SolidColorBrush(Colors.OrangeRed),
                Edited = DateTime.Now
            });

            var note = new NoteWindow(_controller, id);

            note.ShowNoteList.Click += ShowNoteList;
            note.DeleteNote.Click   += DeleteNote;
            note.AddNote.Click      += AddNote;
            note.Show();
            ShowNoteList();
        }