/// <summary>
 ///     Handles the search for shows completing.
 /// </summary>
 /// <param name="sender">
 ///     The sender of the event.
 /// </param>
 /// <param name="e">
 ///     The arguments of the event.
 /// </param>
 private void SearchShowsComplete(object sender, EventArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(new Action(() => SearchShowsComplete(sender, e)));
     }
     else
     {
         foreach (var result in controller.SearchResults)
         {
             var searchResultsController = new SearchResultsController(tvShowRepository);
             var dialog = new ShowSearchDialog(searchResultsController);
             searchResultsController.SetResults(result.Key, result.Value);
             dialog.ShowDialog(this);
         }
     }
 }
 /// <summary>
 /// Handles the Add show button being clicked.
 /// </summary>
 /// <param name="sender">
 /// The sender of the event. 
 /// </param>
 /// <param name="e">
 /// The arguments of the event. 
 /// </param>
 private void AddShowButtonClick(object sender, EventArgs e)
 {
     var dialog = new ShowSearchDialog(new AddShowController());
     dialog.ShowDialog(this);
 }
 /// <summary>
 /// Handles the search for shows completing.
 /// </summary>
 /// <param name="sender">
 /// The sender of the event. 
 /// </param>
 /// <param name="e">
 /// The arguments of the event. 
 /// </param>
 private void SearchShowsComplete(object sender, EventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new Action(() => this.SearchShowsComplete(sender, e)));
     }
     else
     {
         foreach (var result in this.controller.SearchResults)
         {
             var searchResultsController = new SearchResultsController();
             var dialog = new ShowSearchDialog(searchResultsController);
             searchResultsController.SetResults(result.Key, result.Value);
             dialog.ShowDialog(this);
         }
     }
 }
        /// <summary>
        ///     Handles the Add show button being clicked.
        /// </summary>
        /// <param name="sender">
        ///     The sender of the event.
        /// </param>
        /// <param name="e">
        ///     The arguments of the event.
        /// </param>
        private void AddShowButtonClick(object sender, EventArgs e)
        {
            var dialog = new ShowSearchDialog(new AddShowController(tvShowRepository));

            dialog.ShowDialog(this);
        }