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 fillBooks(BookView view) { foreach (Book book in books) { view.addBook(book); } }
public bool removeView(BookView bw) { if (views.Count > 1) { views.Remove(bw); return true; } return false; }
public bool removeView(BookView bw) { if (views.Count > 1) { views.Remove(bw); return(true); } return(false); }
private void MainWindow_MdiChildActivate(object sender, EventArgs e) { BookView bw = (BookView)ActiveMdiChild; if (bw == null) { return; } dontFilterMark = (bw.Filter != (FilterType)filterBox.SelectedIndex); bw.activated(); }
private void filterBox_SelectedIndexChanged(object sender, EventArgs e) { if (dontFilterMark == true) { dontFilterMark = false; return; } BookView bw = (BookView)ActiveMdiChild; if (bw == null) { return; } bw.filterItems((FilterType)filterBox.SelectedIndex); }
public void removeBook() { BookView bw = (BookView)ActiveMdiChild; if (bw == null) { return; } Book toRm = bw.getCurrentlySelected(); if (toRm == null) { return; } currentDocument.removeBook(toRm); bw.activated(); }
public void fillBooks(BookView view) { currentDocument.fillBooks(view); }
public bool removeView(BookView bw) { return(currentDocument.removeView(bw)); }
public void fillBooks(BookView view) { foreach (Book book in books) view.addBook(book); }
public void addView(BookView bv) { views.Add(bv); }