コード例 #1
0
 public static void ManageDirectors(MovieRepository movieRepository, IWin32Window parentWindow)
 {
     using (DirectorManagerDialog dlg = new DirectorManagerDialog(movieRepository))
     {
         dlg.StartPosition = FormStartPosition.CenterParent;
         dlg.ShowDialog(parentWindow);
     }
 }
コード例 #2
0
        public DirectorManagerDialog(MovieRepository movieRepository)
            : this()
        {
            _movieRepository = movieRepository;

            _bindingSource.DataSource = _movieRepository;
            _bindingSource.DataMember = "Directors";

            lstDirectors.DataSource = _bindingSource;
            lstDirectors.DisplayMember = "FullName";

            UpdateButtons();
        }