Example #1
0
        private static Hashtable ShowPartialMatch(List <ImageResult> images)
        {
            Collection <PartialMatche> objPartialMatch = new Collection <PartialMatche>();
            Hashtable objResults = new Hashtable();

            if (images == null || images.Any() == false)
            {
                return(null);
            }

            foreach (ImageResult objResult in images)
            {
                PartialMatche objItem = new PartialMatche
                {
                    Title    = objResult.Title,
                    ImageUrl = objResult.Thumbnail.MediaUrl,
                    Link     = objResult.MediaUrl
                };

                objPartialMatch.Add(objItem);
            }

            partialMatch objWindow = new partialMatch(objPartialMatch);

            objWindow.Title = "Bing - " + objWindow.Title;
            objWindow.ShowDialog();
            if (string.IsNullOrEmpty(objWindow.SelectedLink) == false)
            {
                objResults.Add("Image", objWindow.SelectedLink);
                objResults.Add("Title", objWindow.SelectedTitle);
            }

            return(objResults);
        }
Example #2
0
        private static Artist ShowPartialMatchArtist(IEnumerable <AlloCine> lstItems, LanguageType languageType)
        {
            var lstMatche = new Collection <PartialMatche>();

            foreach (AlloCine item in lstItems)
            {
                var objMatche = new PartialMatche();

                objMatche.Link     = item.Id;
                objMatche.ImageUrl = item.PosterOriginal;
                objMatche.Title    = Util.PurgeHtml(item.Title);

                lstMatche.Add(objMatche);
            }


            partialMatch objWindow = new partialMatch(lstMatche, Provider.AlloCine);

            objWindow.ShowDialog();

            if (string.IsNullOrEmpty(objWindow.SelectedLink) == false)
            {
                return(GetArtist(objWindow.SelectedLink, languageType));
            }

            return(null);
        }
Example #3
0
        private static Artist ShowPartialMatchArtist(IEnumerable <TMDB> lstItems)
        {
            Collection <PartialMatche> lstMatche = new Collection <PartialMatche>();

            foreach (TMDB item in lstItems)
            {
                PartialMatche objMatche = new PartialMatche();

                objMatche.Link     = item.Id;
                objMatche.ImageUrl = item.PosterThumb;
                objMatche.Title    = Util.PurgeHtml(item.Title);

                lstMatche.Add(objMatche);
            }


            partialMatch objWindow = new partialMatch(lstMatche, Provider.Tvdb);

            objWindow.Title = "www.themoviedb.org" + " - " + objWindow.Title;
            objWindow.ShowDialog();

            if (string.IsNullOrEmpty(objWindow.SelectedLink) == false)
            {
                return(GetArtist(objWindow.SelectedLink));
            }

            return(null);
        }
Example #4
0
        private static Hashtable ShowPartialMatch(IEnumerable <string> objTables)
        {
            if (objTables == null)
            {
                return(null);
            }

            Collection <PartialMatche> lstMatche = new Collection <PartialMatche>();

            foreach (string item in objTables)
            {
                string strTemp    = item.Trim();
                string strParsing = @"0.5em";

                if (strTemp.StartsWith(strParsing) == true)
                {
                    PartialMatche objMatche = new PartialMatche();

                    strParsing = @"src=""";

                    int temp = strTemp.IndexOf(strParsing, StringComparison.Ordinal);
                    if (temp > -1)
                    {
                        strTemp            = strTemp.Substring(temp + strParsing.Length);
                        strParsing         = @"""";
                        objMatche.ImageUrl = @"http://www.iafd.com" + strTemp.Substring(0, strTemp.IndexOf(strParsing, StringComparison.Ordinal));

                        strParsing = @"href=""";
                        strTemp    = strTemp.Substring(strTemp.IndexOf(strParsing, StringComparison.Ordinal) + strParsing.Length);
                        strParsing = @"""";
                        string strLink = @"http://www.iafd.com/" + strTemp.Substring(0, strTemp.IndexOf(strParsing, StringComparison.Ordinal));
                        objMatche.Link = strLink;

                        strParsing      = @">";
                        strTemp         = strTemp.Substring(strTemp.IndexOf(strParsing, StringComparison.Ordinal) + strParsing.Length);
                        strParsing      = @"<";
                        objMatche.Title = Util.PurgeHtml(strTemp.Substring(0, strTemp.IndexOf(strParsing, StringComparison.Ordinal)));

                        lstMatche.Add(objMatche);
                    }
                }
            }

            partialMatch objWindow = new partialMatch(lstMatche);

            objWindow.Title = "www.iafd.com" + " - " + objWindow.Title;
            objWindow.ShowDialog();

            if (string.IsNullOrEmpty(objWindow.SelectedLink) == false)
            {
                return(Parse(objWindow.SelectedLink));
            }
            else
            {
                return(null);
            }
        }
        private static Hashtable ShowPartialMatchPortrait(IEnumerable <string> objTables)
        {
            if (objTables == null)
            {
                return(null);
            }

            Collection <PartialMatche> lstMatche = new Collection <PartialMatche>();
            Hashtable objResults = new Hashtable();

            foreach (string item in objTables)
            {
                string strTemp    = item.Trim();
                string strParsing = @""">";

                if (strTemp.StartsWith(strParsing) == true)
                {
                    PartialMatche objMatche = new PartialMatche();

                    strParsing = @"Filmography";
                    int temp = strTemp.IndexOf(strParsing, StringComparison.Ordinal);
                    if (temp > -1)
                    {
                        strTemp = strTemp.Substring(0, temp);

                        strParsing = @"href=""";

                        temp = strTemp.IndexOf(strParsing, StringComparison.Ordinal);
                        if (temp > -1)
                        {
                            strTemp    = strTemp.Substring(temp + strParsing.Length);
                            strParsing = @""">";

                            string strLink = @"http://www.adultdvdempire.com" + strTemp.Substring(0, strTemp.IndexOf(strParsing, StringComparison.Ordinal));
                            objMatche.Link = strLink;

                            strParsing = @"src=""";
                            temp       = strTemp.IndexOf(strParsing, StringComparison.Ordinal);
                            if (temp > -1)
                            {
                                strTemp            = strTemp.Substring(strTemp.IndexOf(strParsing, StringComparison.Ordinal) + strParsing.Length);
                                strParsing         = @"""";
                                objMatche.ImageUrl = strTemp.Substring(0, strTemp.IndexOf(strParsing, StringComparison.Ordinal));
                            }

                            strParsing      = @"ListItem_ItemTitle"">";
                            strTemp         = strTemp.Substring(strTemp.IndexOf(strParsing, StringComparison.Ordinal) + strParsing.Length);
                            strParsing      = @""">";
                            strTemp         = strTemp.Substring(strTemp.IndexOf(strParsing, StringComparison.Ordinal) + strParsing.Length);
                            strParsing      = @"<";
                            objMatche.Title = Util.PurgeHtml(strTemp.Substring(0, strTemp.IndexOf(strParsing, StringComparison.Ordinal)));

                            lstMatche.Add(objMatche);
                        }
                    }
                }
            }

            partialMatch objWindow = new partialMatch(lstMatche);

            objWindow.Title = "www.adultdvdempire.com" + " - " + objWindow.Title;
            objWindow.ShowDialog();

            if (string.IsNullOrEmpty(objWindow.SelectedLink) == false)
            {
                return(ParsePortrait(objWindow.SelectedLink));
            }

            return(objResults);
        }