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(); }
private void MainWindow_MdiChildActivate(object sender, EventArgs e) { BookView bw = (BookView)ActiveMdiChild; if (bw == null) { return; } dontFilterMark = (bw.Filter != (FilterType)filterBox.SelectedIndex); 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(); }