public BookVM EditBookExternalTest(BookVM targetBook) { if (targetBook == null) { return(null); } EditBookWindowVM vm = new EditBookWindowVM(targetBook.Book) { Parent = this }; vm.Init(null); EditBookWindow window = new EditBookWindow(vm); BookVM newBook = null; if (window.ShowDialog() == true) { newBook = new BookVM(vm.Book) { Parent = this }; } window.Content = null; return(newBook); }
private BookVM AddOrEditBook(Book book, BookRelation relation) { EditBookWindowVM vm = new EditBookWindowVM(book) { Parent = this }; vm.Init(relation); EditBookWindow window = new EditBookWindow(vm); window.Owner = Application.Current.MainWindow; BookVM newBook = null; if (window.ShowDialog() == true) { newBook = new BookVM(vm.Book) { Parent = this }; } window.Content = null; return(newBook); }
private BookVM AddOrEditBook(Book book, BookRelation relation) { EditBookWindowVM vm = new EditBookWindowVM(book) { Parent = this }; vm.Init(relation); EditBookWindow window = new EditBookWindow(vm); window.Owner = Application.Current.MainWindow; BookVM newBook = null; if (window.ShowDialog() == true) { newBook = new BookVM(vm.Book) { Parent = this }; } window.Content = null; return newBook; }
public BookVM EditBookExternalTest(BookVM targetBook) { if (targetBook == null) { return null; } EditBookWindowVM vm = new EditBookWindowVM(targetBook.Book) { Parent = this }; vm.Init(null); EditBookWindow window = new EditBookWindow(vm); BookVM newBook = null; if (window.ShowDialog() == true) { newBook = new BookVM(vm.Book) { Parent = this }; } window.Content = null; return newBook; }