Пример #1
0
 private void DeleteSelectedBook()
 {
     Books.Remove(SelectedBook);
     SelectedBook = null;
 }
Пример #2
0
        private void AddNewBook()
        {
            Book newBook = new Book
            {
                Title = "<New Book>",
                ISBN = "0-000-00000-0",
                Pages = 0,
                ReleaseDate = DateTime.Now,
                Price = 0.0,
                SalesRank = 0,
                Format = BookFormatType.Unknown,
                Size = 0
            };

            SelectedBook = new BookViewModel(newBook);
            Books.Add(SelectedBook);
        }