Exemple #1
0
        public FolderMonitorEdit(TheTVDB db, FolderMonitorEntry hint)
        {
            this.InitializeComponent();

            this.mTCCF                        = new TheTVDBCodeFinder("", db);
            this.mTCCF.Dock                   = DockStyle.Fill;
            this.mTCCF.SelectionChanged      += this.CodeChanged;
            this.mTCCF.lvMatches.DoubleClick += this.MatchDoubleClick;


            this.pnlCF.SuspendLayout();
            this.pnlCF.Controls.Add(this.mTCCF);
            this.pnlCF.ResumeLayout();

            if (hint.CodeKnown)
            {
                this.mTCCF.SetHint(hint.TVDBCode.ToString());
            }
            else
            {
                string s = hint.Folder;
                int    p = s.LastIndexOf(System.IO.Path.DirectorySeparatorChar);
                this.mTCCF.SetHint(s.Substring(p + 1));
            }
            this.Code = -1;
        }
        public AutoAddShow(string hint)
        {
            InitializeComponent();
            this.mSI   = new ShowItem();
            this.mTCCF = new TheTVDBCodeFinder("")
            {
                Dock = DockStyle.Fill
            };
            this.mTCCF.SetHint(hint);
            this.mTCCF.SelectionChanged += MTCCF_SelectionChanged;
            this.pnlCF.SuspendLayout();
            this.pnlCF.Controls.Add(this.mTCCF);
            this.pnlCF.ResumeLayout();
            this.ActiveControl = this.mTCCF; // set initial focus to the code entry/show finder control

            this.cbDirectory.SuspendLayout();
            this.cbDirectory.Items.Clear();
            this.cbDirectory.Items.AddRange(TVSettings.Instance.LibraryFolders.ToArray());
            this.cbDirectory.SelectedIndex = 0;
            this.cbDirectory.ResumeLayout();

            this.originalHint = hint;
        }
Exemple #3
0
        public FolderMonitorEdit(TheTVDB db, FolderMonitorEntry hint)
        {
            this.InitializeComponent();

            this.mTCCF = new TheTVDBCodeFinder("", db);
            this.mTCCF.Dock = DockStyle.Fill;
            this.mTCCF.SelectionChanged += this.CodeChanged;
            this.mTCCF.lvMatches.DoubleClick += this.MatchDoubleClick;

            this.pnlCF.SuspendLayout();
            this.pnlCF.Controls.Add(this.mTCCF);
            this.pnlCF.ResumeLayout();

            if (hint.CodeKnown)
                this.mTCCF.SetHint(hint.TVDBCode.ToString());
            else
            {
                string s = hint.Folder;
                int p = s.LastIndexOf(System.IO.Path.DirectorySeparatorChar);
                this.mTCCF.SetHint(s.Substring(p+1));
            }
            this.Code = -1;
        }
Exemple #4
0
        public AddEditShow(ShowItem si)
        {
            this.mSI = si;
            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.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 AddEditShow(ShowItem si)
        {
            this.mSI = si;
            this.InitializeComponent();

            this.cbTimeZone.BeginUpdate();
            this.cbTimeZone.Items.Clear();

            foreach (string s in TimeZone.ZoneNames())
            {
                this.cbTimeZone.Items.Add(s);
            }

            this.cbTimeZone.EndUpdate();
            this.cbTimeZone.Text = si.ShowTimeZone;

            this.mTCCF      = new TheTVDBCodeFinder(si.TVDBCode != -1 ? si.TVDBCode.ToString() : "");
            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.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 = si.UseCustomSearchURL && !String.IsNullOrWhiteSpace(si.CustomSearchURL);
            txtSearchURL.Text         = si.CustomSearchURL ?? "";
            EnableDisableCustomSearch();
        }