public AddEditShow([NotNull] ShowItem si) { selectedShow = si; sampleSeason = si.GetFirstAvailableSeason(); sampleEpisode = si.GetFirstAvailableEpisode(); InitializeComponent(); lblSeasonWordPreview.Text = TVSettings.Instance.SeasonFolderFormat + "-(" + CustomSeasonName.NameFor(si.GetFirstAvailableSeason(), TVSettings.Instance.SeasonFolderFormat) + ")"; lblSeasonWordPreview.ForeColor = Color.DarkGray; SetupDropDowns(si); codeFinderForm = new TheTvdbCodeFinder(si.TvdbCode != -1 ? si.TvdbCode.ToString() : "") { Dock = DockStyle.Fill }; pnlCF.SuspendLayout(); pnlCF.Controls.Add(codeFinderForm); pnlCF.ResumeLayout(); cntfw = null; chkCustomShowName.Checked = si.UseCustomShowName; if (chkCustomShowName.Checked) { txtCustomShowName.Text = si.CustomShowName; } chkCustomShowName_CheckedChanged(null, null); chkCustomLanguage.Checked = si.UseCustomLanguage; if (chkCustomLanguage.Checked) { Language languageFromCode = TheTVDB.Instance.LanguageList.GetLanguageFromCode(si.CustomLanguageCode); if (languageFromCode != null) { cbLanguage.Text = languageFromCode.Name; } } chkCustomLanguage_CheckedChanged(null, null); cbSequentialMatching.Checked = si.UseSequentialMatch; chkShowNextAirdate.Checked = si.ShowNextAirdate; chkSpecialsCount.Checked = si.CountSpecials; txtBaseFolder.Text = si.AutoAddFolderBase; cbDoRenaming.Checked = si.DoRename; cbDoMissingCheck.Checked = si.DoMissingCheck; cbDoMissingCheck_CheckedChanged(null, null); SetAutoAdd(si); txtSeasonFormat.Text = si.AutoAddCustomFolderFormat; chkDVDOrder.Checked = si.DvdOrder; cbIncludeFuture.Checked = si.ForceCheckFuture; cbIncludeNoAirdate.Checked = si.ForceCheckNoAirdate; chkReplaceAutoFolders.Checked = si.ManualFoldersReplaceAutomatic; SetIgnoreSeasons(si); SetManualFolders(si); txtSeasonNumber_TextChanged(null, null); txtFolder_TextChanged(); ActiveControl = codeFinderForm; // set initial focus to the code entry/show finder control foreach (string aliasName in selectedShow.AliasNames) { lbShowAlias.Items.Add(aliasName); } SetTagListText(); cbUseCustomSearch.Checked = si.UseCustomSearchUrl && !string.IsNullOrWhiteSpace(si.CustomSearchUrl); txtSearchURL.Text = si.CustomSearchUrl ?? ""; EnableDisableCustomSearch(); }