/// <summary>Called when [display all authors menu item clicked]. Displays the Author list form.</summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param> private void OnDisplayAllAuthorsMenuItem_Clicked(object sender, EventArgs e) { this.GetAllAuthorsNames(); using (var dlg = new AuthorsListingWin()) { this._result = dlg.ShowDialog(); } if (this._result == DialogResult.Cancel) { return; } this.LoadUnformattedData(); if (string.IsNullOrEmpty(BookListPathsProperties.AuthorsNameCurrent)) { return; } this.MoveToFirstRecord(); }
/// <summary> /// The OnAddExistingAuthorButton_Clicked /// Displays a form with list of existing authors to chose one from. /// </summary> /// <param name="sender">The source of the event.<see cref="object" />The source of the event.</param> /// <param name="e">The e<see cref="EventArgs" />Instance containing the event data.</param> private void OnAddExistingAuthorButton_Clicked(object sender, EventArgs e) { this._msgBox.NameOfMethod = MethodBase.GetCurrentMethod().Name; using (var dlg = new AuthorsListingWin()) { dlg.ShowDialog(); } lblAuthor.Text = BookListPathsProperties.AuthorsNameCurrent.Trim(); SetAddingNewBookControlsState(); }
/// <summary> /// Called when [select author button click]. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param> private void OnSelectSingleAuthorButton_Click(object sender, EventArgs e) { this._msgBox.NameOfMethod = MethodBase.GetCurrentMethod().Name; using (var win = new AuthorsListingWin()) { win.ShowDialog(); } if (!this._valid.ValidateStringHasLength(BookListPathsProperties.AuthorsNameCurrent)) { return; } this.lblAuthor.Text = BookListPathsProperties.AuthorsNameCurrent; BookDataProperties.SetSingleAuthorSearch = true; BookDataProperties.SetAllAuthorsSearch = false; this.txtTitle.Select(); }