public virtual InformationWindow showInformationWindow() { InformationWindow infoWindow = new InformationWindow(this); infoWindow.Show(); return(infoWindow); }
private void buttonPrevBook_Click(object sender, EventArgs e) { if (bookIndex > 0) { InformationWindow newWindow = catalog.getBook(bookIndex - 1).showInformationWindow(); //InformationWindow newWindow = new InformationWindow(catalog.getBook(bookIndex - 1)); this.Close(); newWindow.Show(); newWindow.Location = this.Location; } }
private void buttonNextBook_Click(object sender, EventArgs e) { if (bookIndex < catalog.Books.Count - 1) { //catalog.getBook(bookIndex + 1).showInformationWindow(); InformationWindow newWindow = catalog.getBook(bookIndex + 1).showInformationWindow(); this.Close(); newWindow.Show(); newWindow.Location = this.Location; } }