private void ShowAllBooksNotes_Click(object sender, RoutedEventArgs e)
 {
     if ((e.OriginalSource as AppBarToggleButton).IsChecked.Value)
     {
         // All books, please
         var list      = CommonQueries.BookNotesGetAll();
         var titleList = new List <UserNoteWithTitle>();
         foreach (var bn in list)
         {
             foreach (var note in bn.Notes)
             {
                 titleList.Add(new UserNoteWithTitle(note, true));
             }
         }
         var sortedList = titleList.OrderBy(item => item.Title).ThenBy(item => item.BaseNote.LocationNumericValue);
         Notes.Clear();
         foreach (var note in sortedList)
         {
             Notes.Add(note);
         }
     }
     else
     {
         // Just the one book
         SetNotes(CurrBookData);
     }
 }
Beispiel #2
0
        public static void ReloadAllNotes()
        {
            AllNotes = new Dictionary <string, BookNotes>();
            var bn = CommonQueries.BookNotesGetAll();

            foreach (var note in bn)
            {
                AllNotes[note.BookId] = note;
            }
        }