/// <summary>Loads the book titles and info for the selected artist to a collection.</summary> private void LoadUnformattedData() { var fileInput = new InputClass(); this.GetUnformattedDataFrom(); if (string.IsNullOrEmpty(BookListPathsProperties.PathToCurrentAuthorsFile)) { return; } fileInput.ReadTitlesFromFileLoop(BookListPathsProperties.PathToCurrentAuthorsFile); var coll = new global::BookList.Collections.BookDataCollection(); _totalCount = coll.GetItemsCount(); }
/// <summary> /// Called when [show all titles for author button clicked]. /// </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 OnShowAllTitlesSingleAuthorButton_Clicked(object sender, EventArgs e) { this._msgBox.NameOfMethod = MethodBase.GetCurrentMethod().Name; var dirAuthors = BookListPathsProperties.PathAuthorsDirectory; var cls1 = new CombinePathsClass(); var filePath = cls1.CombineDirectoryPathWithFileName(dirAuthors, BookListPathsProperties.CurrentWorkingFileName); var cls2 = new BookDataCollection(); cls2.ClearCollection(); var cls3 = new InputClass(); cls3.ReadTitlesFromFileLoop(filePath); var cls4 = new AuthorOperationsClass(); cls4.ShowAllBookTitlesBySingleAuthorLoop(); this.lstTiltes.Items.Clear(); }