public AddEditShow(ShowItem si, TheTVDB db) { this.mSI = si; this.mTVDB = db; this.InitializeComponent(); this.cbTimeZone.BeginUpdate(); this.cbTimeZone.Items.Clear(); foreach (string s in TimeZone.ZoneNames()) { this.cbTimeZone.Items.Add(s); } this.cbTimeZone.EndUpdate(); this.mTCCF = new TheTVDBCodeFinder(si.TVDBCode != -1 ? si.TVDBCode.ToString() : "", this.mTVDB); this.mTCCF.Dock = DockStyle.Fill; //mTCCF->SelectionChanged += gcnew System::EventHandler(this, &AddEditShow::lvMatches_ItemSelectionChanged); this.pnlCF.SuspendLayout(); this.pnlCF.Controls.Add(this.mTCCF); this.pnlCF.ResumeLayout(); this.chkCustomShowName.Checked = si.UseCustomShowName; if (this.chkCustomShowName.Checked) { this.txtCustomShowName.Text = si.CustomShowName; } this.chkCustomShowName_CheckedChanged(null, null); this.cbSequentialMatching.Checked = si.UseSequentialMatch; this.chkShowNextAirdate.Checked = si.ShowNextAirdate; this.chkSpecialsCount.Checked = si.CountSpecials; this.chkFolderPerSeason.Checked = si.AutoAdd_FolderPerSeason; this.txtSeasonFolderName.Text = si.AutoAdd_SeasonFolderName; this.txtBaseFolder.Text = si.AutoAdd_FolderBase; this.chkAutoFolders.Checked = si.AutoAddNewSeasons; this.chkFolderPerSeason_CheckedChanged(null, null); this.cbDoRenaming.Checked = si.DoRename; this.cbDoMissingCheck.Checked = si.DoMissingCheck; this.cbDoMissingCheck_CheckedChanged(null, null); this.chkPadTwoDigits.Checked = si.PadSeasonToTwoDigits; this.ShowTimeZone = ((si == null) || (si.TheSeries() == null)) ? TimeZone.DefaultTimeZone() : si.TheSeries().ShowTimeZone; this.cbTimeZone.Text = this.ShowTimeZone; this.chkDVDOrder.Checked = si.DVDOrder; this.cbIncludeFuture.Checked = si.ForceCheckFuture; this.cbIncludeNoAirdate.Checked = si.ForceCheckNoAirdate; bool first = true; si.IgnoreSeasons.Sort(); foreach (int i in si.IgnoreSeasons) { if (!first) { this.txtIgnoreSeasons.Text += " "; } this.txtIgnoreSeasons.Text += i.ToString(); first = false; } foreach (System.Collections.Generic.KeyValuePair <int, List <string> > kvp in si.ManualFolderLocations) { foreach (string s in kvp.Value) { ListViewItem lvi = new ListViewItem(); lvi.Text = kvp.Key.ToString(); lvi.SubItems.Add(s); this.lvSeasonFolders.Items.Add(lvi); } } this.lvSeasonFolders.Sort(); this.txtSeasonNumber_TextChanged(null, null); this.txtFolder_TextChanged(null, null); this.ActiveControl = mTCCF; // set initial focus to the code entry/show finder control foreach (string aliasName in this.mSI.AliasNames) { lbShowAlias.Items.Add(aliasName); } StringBuilder tl = new StringBuilder(); foreach (string s in CustomName.Tags) { tl.AppendLine(s); } this.txtTagList.Text = tl.ToString(); cbUseCustomSearch.Checked = !String.IsNullOrEmpty(si.CustomSearchURL); txtSearchURL.Text = si.CustomSearchURL ?? ""; EnableDisableCustomSearch(); }
public string GetTargetEpisodeName(ShowItem show, Episode ep, TimeZone tz, bool dvdOrder) => GetTargetEpisodeName(show, ep, tz, dvdOrder, false);