public BulkAddEditMovie([NotNull] PossibleNewMovie hint) { InitializeComponent(); codeFinderControl = new TmdbCodeFinder("") { Dock = DockStyle.Fill }; codeFinderControl.SelectionChanged += CodeChanged; codeFinderControl.lvMatches.DoubleClick += MatchDoubleClick; pnlCF.SuspendLayout(); pnlCF.Controls.Add(codeFinderControl); pnlCF.ResumeLayout(); if (hint.CodeKnown) { codeFinderControl.SetHint(hint.TMDBCode.ToString()); //todo make generic } else { codeFinderControl.SetHint(string.IsNullOrWhiteSpace(hint.RefinedHint) ? hint.Directory.Name : hint.RefinedHint); } Code = -1; }
public AddEditMovie([NotNull] MovieConfiguration si, TVDoc doc) { selectedShow = si; mDoc = doc; addingNewShow = si.TvdbCode == -1; InitializeComponent(); SetupDropDowns(si); lblSeasonWordPreview.Text = TVSettings.Instance.MovieFolderFormat + "-(" + CustomMovieName.NameFor(si, TVSettings.Instance.MovieFolderFormat) + ")"; lblSeasonWordPreview.ForeColor = Color.DarkGray; codeFinderForm = new TmdbCodeFinder(si.TmdbCode != -1 ? si.TmdbCode.ToString() : "") { Dock = DockStyle.Fill }; codeFinderForm.SelectionChanged += MTCCF_SelectionChanged; pnlCF.SuspendLayout(); pnlCF.Controls.Add(codeFinderForm); pnlCF.ResumeLayout(); cntfw = null; chkCustomShowName.Checked = si.UseCustomShowName; if (chkCustomShowName.Checked) { txtCustomShowName.Text = si.CustomShowName; } chkCustomRegion.Checked = selectedShow.UseCustomRegion; cbRegion.Text = selectedShow.CustomRegionCode; UpdateCustomShowNameEnabled(); SetupLanguages(si); cbDoRenaming.Checked = si.DoRename; cbDoMissingCheck.Checked = si.DoMissingCheck; SetProvider(si); chkManualFolders.Checked = selectedShow.UseManualLocations; chkAutoFolders.Checked = selectedShow.UseAutomaticFolders; PopulateRootDirectories(selectedShow.AutomaticFolderRoot); txtFolderNameFormat.Text = selectedShow.CustomFolderNameFormat; txtCustomMovieFileNamingFormat.Text = selectedShow.CustomNamingFormat; cbUseCustomNamingFormat.Checked = selectedShow.UseCustomNamingFormat; ActiveControl = codeFinderForm; // set initial focus to the code entry/show finder control foreach (string folder in selectedShow.ManualLocations) { lvManualFolders.Items.Add(folder); } PopulateAliasses(); SetTagListText(); EnableDisableCustomNaming(); UpdateIgnore(); SetMovieFolderType(si); }