public static void ManageDirectors(MovieRepository movieRepository, IWin32Window parentWindow) { using (DirectorManagerDialog dlg = new DirectorManagerDialog(movieRepository)) { dlg.StartPosition = FormStartPosition.CenterParent; dlg.ShowDialog(parentWindow); } }
public DirectorManagerDialog(MovieRepository movieRepository) : this() { _movieRepository = movieRepository; _bindingSource.DataSource = _movieRepository; _bindingSource.DataMember = "Directors"; lstDirectors.DataSource = _bindingSource; lstDirectors.DisplayMember = "FullName"; UpdateButtons(); }