private void AddBook_Click(object sender, RoutedEventArgs e) { BM.theBook = new ViewBook() { UploaderName = "*****@*****.**" }; if (bWin == null) { bWin = new BookWindow(Mode.Post, BM, this); } bWin.Show(); }
private void Edit_Click(object sender, RoutedEventArgs e) { var selected = lstBooks.SelectedItem; if (selected == null) { setStatus("Please select a book to edit!"); } else { ViewBook vBook = selected as ViewBook; vBook.PathUrl = ""; BM.theBook = vBook; if (bWin == null) { bWin = new BookWindow(Mode.Put, BM, this); } bWin.Show(); } }