Пример #1
0
        /// <summary>
        /// Processes the search results.
        /// </summary>
        /// <param name="seriesResults">The series results.</param>
        /// <param name="searchTerm">The search term.</param>
        /// <returns>
        /// The process search results.
        /// </returns>
        public SearchDetails ProcessSearchResults(List <SearchDetails> seriesResults, string searchTerm)
        {
            if (seriesResults.Count > 1 || seriesResults.Count == 0)
            {
                var frmSelectSeriesName = new FrmSelectSeries(seriesResults, searchTerm);
                frmSelectSeriesName.ShowDialog();

                return(frmSelectSeriesName.SelectedSeries);
            }

            if (seriesResults.Count == 1)
            {
                return(seriesResults[0]);
            }

            return(null);
        }
Пример #2
0
        /// <summary>
        /// Processes the search results.
        /// </summary>
        /// <param name="seriesResults">The series results.</param>
        /// <param name="searchTerm">The search term.</param>
        /// <returns>
        /// The process search results.
        /// </returns>
        public SearchDetails ProcessSearchResults(List <SearchDetails> seriesResults, string searchTerm)
        {
            if (seriesResults.Count > 1 || seriesResults.Count == 0)
            {
                Factories.UI.Windows7UIFactory.PauseProgressState();

                var frmSelectSeriesName = new FrmSelectSeries(seriesResults, searchTerm);
                frmSelectSeriesName.ShowDialog();

                Factories.UI.Windows7UIFactory.PauseProgressState();

                return(frmSelectSeriesName.SelectedSeries);
            }

            if (seriesResults.Count == 1)
            {
                return(seriesResults[0]);
            }

            return(null);
        }