Dialog for searching for a show.
Inheritance: System.Windows.Forms.Form, IView
Beispiel #1
0
 /// <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);
         }
     }
 }
Beispiel #2
0
 /// <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);
 }
Beispiel #3
0
 /// <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);
         }
     }
 }
Beispiel #4
0
        /// <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);
        }