Esempio n. 1
0
        /// <summary>
        ///     Searches the book title by single author.
        /// </summary>
        public void SearchBookTitleBySingleAuthor()
        {
            this._msgBox.NameOfMethod = MethodBase.GetCurrentMethod().Name;

            var dirAuthors = BookListPathsProperties.PathAuthorsDirectory;

            var cls1     = new CombinePathsClass();
            var filePath = cls1.CombineDirectoryPathWithFileName(dirAuthors,
                                                                 BookListPathsProperties.CurrentWorkingFileName);

            var coll = new BookDataCollection();

            coll.ClearCollection();

            var titles = new BookTitlesCollection();

            titles.ClearCollection();

            var cls2 = new InputClass();

            cls2.ReadTitlesFromFileLoop(filePath);

            this.FindTitlesInString();

            if (titles.GetItemsCount() < 1)
            {
                titles.AddItem("No titles with this search criteria were found.");
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     Finds the titles in string.
        /// </summary>
        private void FindTitlesInString()
        {
            this._msgBox.NameOfMethod = MethodBase.GetCurrentMethod().Name;

            var coll = new BookTitlesCollection();

            coll.ClearCollection();

            this.BookTitlesSearchLoop();
        }