示例#1
0
 private void bnOpenIgFolder_Click(object sender, System.EventArgs e)
 {
     if (this.lstFMIgnoreFolders.SelectedIndex != -1)
     {
         Helpers.SysOpen(this.mDoc.MonitorFolders[this.lstFMIgnoreFolders.SelectedIndex]);
     }
 }
示例#2
0
 private void bnOpenIgFolder_Click(object sender, System.EventArgs e)
 {
     if (this.lstFMIgnoreFolders.SelectedIndex != -1)
     {
         Helpers.SysOpen(TVSettings.Instance.LibraryFolders[this.lstFMIgnoreFolders.SelectedIndex]);
     }
 }
示例#3
0
 private void bnOpenMonFolder_Click(object sender, System.EventArgs e)
 {
     if (lstFMMonitorFolders.SelectedIndex != -1)
     {
         Helpers.SysOpen(TVSettings.Instance.LibraryFolders[lstFMMonitorFolders.SelectedIndex]);
     }
 }
示例#4
0
        private void TVDBFor([CanBeNull] Season seas)
        {
            if (seas is null)
            {
                return;
            }

            Helpers.SysOpen(TheTVDB.Instance.WebsiteUrl(seas.TheSeries.TvdbCode, seas.SeasonId, false));
        }
示例#5
0
        private void TVDBFor(ShowItem si)
        {
            if (si == null)
            {
                return;
            }

            Helpers.SysOpen(TheTVDB.Instance.WebsiteURL(si.TVDBCode, -1, false));
        }
示例#6
0
        private void TVDBFor(Season seas)
        {
            if (seas == null)
            {
                return;
            }

            Helpers.SysOpen(TheTVDB.Instance.WebsiteURL(seas.TheSeries.TVDBCode, seas.SeasonID, false));
        }
示例#7
0
        private static void TvdbFor([CanBeNull] Season seas)
        {
            if (seas is null)
            {
                return;
            }

            Helpers.SysOpen(API.WebsiteSeasonUrl(seas));
        }
示例#8
0
        private static void TvdbFor([CanBeNull] ShowItem si)
        {
            if (si is null)
            {
                return;
            }

            Helpers.SysOpen(API.WebsiteShowUrl(si));
        }
示例#9
0
        public static void SearchForEpisode([CanBeNull] ProcessedEpisode ep)
        {
            if (ep is null)
            {
                return;
            }

            Helpers.SysOpen(TVSettings.Instance.BTSearchURL(ep));
        }
示例#10
0
        private void TVDBFor([CanBeNull] ShowItem si)
        {
            if (si is null)
            {
                return;
            }

            Helpers.SysOpen(TheTVDB.Instance.WebsiteUrl(si.TvdbCode, -1, false));
        }
示例#11
0
        private void showRightClickMenu_ItemClicked(object sender, [NotNull] ToolStripItemClickedEventArgs e)
        {
            showRightClickMenu.Close();
            RightClickCommands n = (RightClickCommands)e.ClickedItem.Tag;

            switch (n)
            {
            case RightClickCommands.kVisitTvdbSeason:
            {
                TvdbFor(mLastSeasonClicked);
                break;
            }

            case RightClickCommands.kVisitTvdbSeries:
            {
                TvdbFor(mLastShowClicked);
                break;
            }

            case RightClickCommands.kForceRefreshSeries:
                ForceRefresh(mLastShowClicked);
                break;

            default:
            {
                if (n >= RightClickCommands.kWatchBase && n < RightClickCommands.kOpenFolderBase)
                {
                    int wn = n - RightClickCommands.kWatchBase;
                    if (mLastFileList != null && wn >= 0 && wn < mLastFileList.Count)
                    {
                        Helpers.SysOpen(mLastFileList[wn].FullName);
                    }
                }
                else if (n >= RightClickCommands.kOpenFolderBase)
                {
                    int fnum = n - RightClickCommands.kOpenFolderBase;

                    if (fnum < mFoldersToOpen.Count)
                    {
                        string folder = mFoldersToOpen[fnum];

                        if (Directory.Exists(folder))
                        {
                            Helpers.SysOpen(folder);
                        }
                    }
                }
                else
                {
                    Debug.Fail("Unknown right-click action " + n);
                }

                break;
            }
            }
        }
示例#12
0
        private void showRightClickMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            this.showRightClickMenu.Close();
            RightClickCommands n = (RightClickCommands)e.ClickedItem.Tag;

            switch (n)
            {
            case RightClickCommands.kVisitTVDBSeason:
            {
                this.TVDBFor(this.mLastSeasonClicked);
                break;
            }

            case RightClickCommands.kVisitTVDBSeries:
            {
                this.TVDBFor(this.mLastShowClicked);
                break;
            }

            case RightClickCommands.kForceRefreshSeries:
                this.ForceRefresh(this.mLastShowClicked);
                break;

            default:
            {
                if ((n >= RightClickCommands.kWatchBase) && (n < RightClickCommands.kOpenFolderBase))
                {
                    int wn = n - RightClickCommands.kWatchBase;
                    if ((this.mLastFL != null) && (wn >= 0) && (wn < this.mLastFL.Count))
                    {
                        Helpers.SysOpen(this.mLastFL[wn].FullName);
                    }
                }
                else if (n >= RightClickCommands.kOpenFolderBase)
                {
                    int fnum = n - RightClickCommands.kOpenFolderBase;

                    if (fnum < this.mFoldersToOpen.Count)
                    {
                        string folder = this.mFoldersToOpen[fnum];

                        if (Directory.Exists(folder))
                        {
                            Helpers.SysOpen(folder);
                        }
                    }
                    return;
                }
                else
                {
                    System.Diagnostics.Debug.Fail("Unknown right-click action " + n);
                }
                break;
            }
            }
        }
示例#13
0
        private void bnOpenSearchFolder_Click(object sender, System.EventArgs e)
        {
            int n = this.lbSearchFolders.SelectedIndex;

            if (n == -1)
            {
                return;
            }
            Helpers.SysOpen(this.mDoc.SearchFolders[n]);
        }
示例#14
0
        private void bnRSSGo_Click(object sender, System.EventArgs e)
        {
            // multiselection is off, so we can cheat...
            int[] rowsIndex = this.RSSGrid.Selection.GetSelectionRegion().GetRowsIndex();

            if (rowsIndex.Length > 0)
            {
                Helpers.SysOpen((string)(this.RSSGrid[rowsIndex[0], 0].Value));
            }
        }
示例#15
0
        private void bnNewFolderOpen_Click(object sender, System.EventArgs e)
        {
            if (lvFMNewShows.SelectedItems.Count == 0)
            {
                return;
            }

            if (lvFMNewShows.SelectedItems[0].Tag is FoundFolder ai)
            {
                Helpers.SysOpen(ai.Folder.FullName);
            }
        }
示例#16
0
        private void bnNewFolderOpen_Click(object sender, System.EventArgs e)
        {
            if (this.lvFMNewShows.SelectedItems.Count == 0)
            {
                return;
            }

            if (this.lvFMNewShows.SelectedItems[0].Tag is FolderMonitorEntry ai)
            {
                Helpers.SysOpen(ai.Folder);
            }
        }
示例#17
0
        private void bnVisitTVcom_Click(object sender, System.EventArgs e)
        {
            if (lvFMNewShows.SelectedItems.Count == 0)
            {
                return;
            }

            if (!(lvFMNewShows.SelectedItems[0].Tag is FoundFolder fme))
            {
                return;
            }

            if (fme.TVDBCode != -1)
            {
                Helpers.SysOpen(TheTVDB.Instance.WebsiteUrl(fme.TVDBCode, -1, false));
            }
        }
示例#18
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            double amount = 5.00; // default amount

            try
            {
                string s = Regex.Replace(this.comboBox1.Text, "\\$", "");
                amount = double.Parse(s);
            }
            catch
            {
            }

            string currency = this.comboBox2.Text;

            CultureInfo usCI = new CultureInfo("en-US", false);

            string paypalURL = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal%40tvrename%2ecom&item_name=TVRename%20thank-you%20drink&no_shipping=0&no_note=1&amount=" + amount.ToString("N", usCI) + "&tax=0&currency_code=" + currency + "&lc=AU&bn=PP%2dDonationsBF&charset=UTF%2d8";

            Helpers.SysOpen(paypalURL);
        }
示例#19
0
        //private void ProcessAddItems(FolderMonitorEntryList toAdd)
        //{
        //    foreach (FolderMonitorEntry ai in toAdd)
        //    {
        //        if (ai.TheSeries == null)
        //            continue; // skip

        //        // see if there is a matching show item
        //        ShowItem found = null;
        //        foreach (ShowItem si in this.mDoc.GetShowItems(true))
        //        {
        //            if ((ai.TheSeries != null) && (ai.TheSeries.TVDBCode == si.TVDBCode))
        //            {
        //                found = si;
        //                break;
        //            }
        //        }
        //        this.mDoc.UnlockShowItems();
        //        if (found == null)
        //        {
        //           xxx
        //               ShowItem si = new ShowItem(this.mDoc.GetTVDB(false, ""));
        //            si.TVDBCode = ai.TheSeries.TVDBCode;
        //            //si->ShowName = ai->TheSeries->Name;
        //            this.mDoc.GetShowItems(true).Add(si);
        //            this.mDoc.UnlockShowItems();
        //            this.mDoc.GenDict();
        //            found = si;
        //        }

        //        if ((ai.FolderMode == FolderModeEnum.kfmFolderPerSeason) || (ai.FolderMode == FolderModeEnum.kfmFlat))
        //        {
        //            found.AutoAdd_FolderBase = ai.Folder;
        //            found.AutoAdd_FolderPerSeason = ai.FolderMode == FolderModeEnum.kfmFolderPerSeason;
        //            string foldername = "Season ";

        //            foreach (DirectoryInfo di in new DirectoryInfo(ai.Folder).GetDirectories("*Season *"))
        //            {
        //                string s = di.FullName;
        //                string f = ai.Folder;
        //                if (!f.EndsWith(System.IO.Path.DirectorySeparatorChar.ToString()))
        //                    f = f + System.IO.Path.DirectorySeparatorChar;
        //                f = Regex.Escape(f);
        //                s = Regex.Replace(s, f + "(.*Season ).*", "$1", RegexOptions.IgnoreCase);
        //                if (!string.IsNullOrEmpty(s))
        //                {
        //                    foldername = s;
        //                    break;
        //                }
        //            }

        //            found.AutoAdd_SeasonFolderName = foldername;
        //        }

        //        if ((ai.FolderMode == FolderModeEnum.kfmSpecificSeason) && (ai.SpecificSeason != -1))
        //        {
        //            if (!found.ManualFolderLocations.ContainsKey(ai.SpecificSeason))
        //                found.ManualFolderLocations[ai.SpecificSeason] = new StringList();
        //            found.ManualFolderLocations[ai.SpecificSeason].Add(ai.Folder);
        //        }

        //        this.mDoc.Stats().AutoAddedShows++;
        //    }

        //    this.mDoc.Dirty();
        //    toAdd.Clear();

        //    this.FillFMNewShowList(true);
        //}

        //private void GuessAll() // not all -> selected only
        //{
        //    foreach (FolderMonitorEntry ai in this.mDoc.AddItems)
        //        this.mDoc.MonitorGuessShowItem(ai);
        //    this.FillFMNewShowList(false);
        //}

        private void bnVisitTVcom_Click(object sender, System.EventArgs e)
        {
            if (lvFMNewShows.SelectedItems.Count == 0)
            {
                return;
            }

            FolderMonitorEntry fme = this.lvFMNewShows.SelectedItems[0].Tag as FolderMonitorEntry;

            if (fme == null)
            {
                return;
            }

            int code = fme.TVDBCode;

            if (code != -1)
            {
                Helpers.SysOpen(TheTVDB.Instance.WebsiteURL(code, -1, false));
            }
        }
示例#20
0
 private void lnkOpenRightFolder_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     Helpers.SysOpen(rightFile.DirectoryName);
 }
示例#21
0
 private void bnBTSecondOpen_Click(object sender, System.EventArgs e)
 {
     Helpers.SysOpen(this.txtBTSecondLocation.Text);
 }
示例#22
0
 private void bnBTOpenFolder_Click(object sender, System.EventArgs e)
 {
     Helpers.SysOpen(this.txtFolder.Text);
 }
示例#23
0
 private void llCustomSearchPreview_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     Helpers.SysOpen(llCustomSearchPreview.Text);
 }
示例#24
0
 private static void OpenInfoWindow(string page)
 {
     Helpers.SysOpen($"https://www.tvrename.com/manual/user{page}");
 }
示例#25
0
 public override void OnClick(SourceGrid.CellContext sender, EventArgs e)
 {
     Helpers.SysOpen("http://www.imdb.com/find?s=nm&q=" + who);
 }
示例#26
0
 private void linkForum_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     Helpers.SysOpen("https://groups.google.com/forum/#!forum/tvrename");
 }