public void modifyBook() { BookView bw = (BookView)ActiveMdiChild; if (bw == null) { return; } Book toMod = bw.getCurrentlySelected(); if (toMod == null) { return; } BookDetailsWindow bd = new BookDetailsWindow(toMod); bd.ShowDialog(); if (bd.IsBookAccepted) { bd.fillBook(toMod); currentDocument.updateBook(toMod); } bw.activated(); }
public void removeBook() { BookView bw = (BookView)ActiveMdiChild; if (bw == null) { return; } Book toRm = bw.getCurrentlySelected(); if (toRm == null) { return; } currentDocument.removeBook(toRm); bw.activated(); }