public bool OnSelectMovie(IMDBFetcher fetcher, out int selectedMovie)
        {
            DlgMovieList dlg = new DlgMovieList();

            dlg.Filename = fetcher.MovieName;
            for (int i = 0; i < fetcher.Count; ++i)
            {
                dlg.AddMovie(fetcher[i].Title);
            }
            DialogResult result = dlg.ShowDialog(this);

            this.Update();
            if (result == DialogResult.Cancel)
            {
                selectedMovie = -1;
                return(false);
            }
            selectedMovie = dlg.SelectedItem;
            if (dlg.IsNewFind)
            {
                _newMovieToFind = dlg.NewTitleToFind;
                selectedMovie   = -1;
            }
            return(true);
        }
示例#2
0
 public bool OnSelectMovie(IMDBFetcher fetcher, out int selectedMovie)
 {
   DlgMovieList dlg = new DlgMovieList();
   dlg.Filename = fetcher.MovieName;
   for (int i = 0; i < fetcher.Count; ++i)
   {
     dlg.AddMovie(fetcher[i].Title);
   }
   DialogResult result = dlg.ShowDialog(this);
   this.Update();
   if (result == DialogResult.Cancel)
   {
     selectedMovie = -1;
     return false;
   }
   selectedMovie = dlg.SelectedItem;
   if (dlg.IsNewFind)
   {
     _newMovieToFind = dlg.NewTitleToFind;
     selectedMovie = -1;
   }
   return true;
 }