当前位置: 首页>>代码示例>>C#>>正文


C# BindingList.IsFilled方法代码示例

本文整理汇总了C#中BindingList.IsFilled方法的典型用法代码示例。如果您正苦于以下问题:C# BindingList.IsFilled方法的具体用法?C# BindingList.IsFilled怎么用?C# BindingList.IsFilled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BindingList的用法示例。


在下文中一共展示了BindingList.IsFilled方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ScrapeWriters

        /// <summary>
        /// Scrapes the writers value
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped runtime value.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeWriters(string id, int threadID, out BindingList<PersonModel> output, string logCatagory)
        {
            output = new BindingList<PersonModel>();

            try
            {
                output = YRegex.MatchesToPersonList(
                    "сценарий(?<writers>.*?)</td></tr>",
                    this.GetHtml("main", threadID, id),
                    "writers",
                    true);

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:Acrisius,项目名称:YANFOE.v2,代码行数:28,代码来源:Kinopoisk.cs

示例2: ScrapeCast

        /// <summary>
        /// Scrapes the Cast collection.
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped Cast value.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeCast(string id, int threadID, out BindingList<PersonModel> output, string logCatagory)
        {
            output = new BindingList<PersonModel>();

            try
            {
                var html = this.GetHtml("main", threadID, id);

                output = YRegex.MatchDelimitedToList(
                    "Cast.*?=\"2\">(?<cast>.*?)</f",
                    html,
                    "cast",
                    ',', 
                    true)
                    .ToPersonList();

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:rsanch1,项目名称:YANFOE.v2,代码行数:32,代码来源:FilmUp.cs

示例3: ScrapeCountry

        /// <summary>
        /// Scrapes the Country copllection
        /// </summary>
        /// <param name="id">The Id for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped Country collection.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>
        /// Scrape succeeded [true/false]
        /// </returns>
        public new bool ScrapeCountry(string id, int threadID, out BindingList<string> output, string logCatagory)
        {
            output = new BindingList<string>();

            try
            {
                output = YRegex.MatchDelimitedToList(
                    "Nazione:(?<country>.*?)Anno", this.GetHtml("main", threadID, id), "country", ',', true);


                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:rsanch1,项目名称:YANFOE.v2,代码行数:28,代码来源:FilmUp.cs

示例4: ScrapeCountry

        /// <summary>
        /// Scrapes the Country copllection
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped Country collection.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeCountry(string id, int threadID, out BindingList<string> output, string logCatagory)
        {
            output = new BindingList<string>();

            try
            {
                var html = this.GetHtml("main", threadID, id);

                output = YRegex.MatchesToList("Kat=Land&Text=(?<country>.*?)\"", html, "country", true);

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:rsanch1,项目名称:YANFOE.v2,代码行数:26,代码来源:Ofdb.cs

示例5: ScrapeDirector

        /// <summary>
        /// Scrapes the Director value
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped Director value.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeDirector(string id, int threadID, out BindingList<PersonModel> output, string logCatagory)
        {
            output = new BindingList<PersonModel>();

            try
            {
                output = YRegex.MatchDelimitedToList(
                    @"Regia:.*?=""2"">(?<director>.*?)</font",
                    this.GetHtml("main", threadID, id),
                    "director", 
                    ',', true).ToPersonList();

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:rsanch1,项目名称:YANFOE.v2,代码行数:28,代码来源:FilmUp.cs

示例6: ScrapeWriters

        /// <summary>
        /// Scrapes the writers value
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped runtime value.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeWriters(string id, int threadID, out BindingList<PersonModel> output, string logCatagory)
        {
            output = new BindingList<PersonModel>();
            try
            {
                output = YRegex.MatchesToPersonList(
                    @"reżyseria(?<director>.*?)scenariusz",
                    this.GetHtml("main", threadID, id),
                    "runtime", 
                    true);

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:Acrisius,项目名称:YANFOE.v2,代码行数:27,代码来源:FilmWeb.cs

示例7: ScrapeTrailer


//.........这里部分代码省略.........

                if (atsm != null && !atsm.error)
                {
                    for (int i = 0; i < atsm.results.Count; i++)
                    {
                        if (atsm.results[i].title.ToLower() == id.ToLower())
                        {
                            if ((itmsIndex = atsm.results[i].location.IndexOf("itms://")) != -1)
                            {
                                moviePage = "http" + atsm.results[i].location.Substring(itmsIndex + 4);
                            }
                            else
                            {
                                moviePage = this.GetAbsoluteURL(
                                    "http://trailers.apple.com/trailers/", atsm.results[i].location);
                            }

                            string moviePlaylist = this.GetAbsoluteURL(moviePage, "includes/playlists/web.inc");

                            html = Downloader.ProcessDownload(moviePage, DownloadType.Html, Section.Movies);
                            matchCollection = trailerRegex.Matches(html);
                            if (matchCollection.Count != 0)
                            {
                                foreach (Match trailerMatch in matchCollection)
                                {
                                    int lastUnderscore = trailerMatch.Value.LastIndexOf('_');
                                    if (lastUnderscore == -1) continue;
                                    if (trailerMatch.Value[lastUnderscore+1] != 'h')
                                    {
                                        output.Add(
                                            new TrailerDetailsModel(
                                                trailerMatch.Value.Insert(lastUnderscore + 1, "h"),
                                                "0",
                                                "Unk",
                                                atsm.results[i].title));
                                    }
                                    else
                                    {
                                        if (trailerMatch.Value[lastUnderscore + 2] == '.')
                                            output.Add(
                                                new TrailerDetailsModel(
                                                    trailerMatch.Value.Remove(lastUnderscore + 2, 1),
                                                    "0",
                                                    "Unk",
                                                    atsm.results[i].title));
                                        else
                                            output.Add(new TrailerDetailsModel(trailerMatch.Value, "0", "Unk", atsm.results[i].title));
                                    }
                                }

                                continue;
                            }

                            html = Downloader.ProcessDownload(moviePlaylist, DownloadType.Html, Section.Movies);
                            matchCollection = trailerRegex.Matches(html);
                            if (matchCollection.Count != 0)
                            {
                                foreach (Match trailerMatch in matchCollection)
                                {
                                    int lastUnderscore = trailerMatch.Value.LastIndexOf('_');
                                    if (lastUnderscore == -1) continue;
                                    if (trailerMatch.Value[lastUnderscore + 1] != 'h')
                                    {
                                        output.Add(
                                            new TrailerDetailsModel(
                                                trailerMatch.Value.Insert(lastUnderscore + 1, "h"),
                                                "0",
                                                "Unk",
                                                atsm.results[i].title));
                                    }
                                    else
                                    {
                                        if (trailerMatch.Value[lastUnderscore + 2] == '.')
                                            output.Add(
                                                new TrailerDetailsModel(
                                                    trailerMatch.Value.Remove(lastUnderscore + 2, 1),
                                                    "0",
                                                    "Unk",
                                                    atsm.results[i].title));
                                        else
                                            output.Add(new TrailerDetailsModel(trailerMatch.Value, "0", "Unk", atsm.results[i].title));
                                    }
                                }

                                continue;
                            }
                        }
                    }

                    return output.IsFilled();
                }

                return false;
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:Acrisius,项目名称:YANFOE.v2,代码行数:101,代码来源:Apple.cs

示例8: ScrapeDirector

        /// <summary>
        /// Scrapes the Director value
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped Director value.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeDirector(string id, int threadID, out BindingList<PersonModel> output, string logCatagory)
        {
            output = new BindingList<PersonModel>();

            try
            {
                var directors = YRegex.Match(
                        @"Directed By (?<director>.*?)\.", 
                        this.GetHtml("main", threadID, id), 
                        "director", 
                        true);

                directors = Tools.Clean.Text.ValidizeResult(directors);

                output = directors
                            .Split(',')
                            .ToPersonList();

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:rsanch1,项目名称:YANFOE.v2,代码行数:34,代码来源:IMDB.cs

示例9: ScrapeCountry

        /// <summary>
        /// Scrapes the Country copllection
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped Country collection.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeCountry(string id, int threadID, out BindingList<string> output, string logCatagory)
        {
            output = new BindingList<string>();

            try
            {
                var match = YRegex.MatchesToList(
                    "<a href=\"/country/.{0,30}?\">(?<country>.*?)</a>",
                    this.GetHtml("main", threadID, id), 
                    "country", 
                    true);

                foreach (var country in match)
                {
                    if (Equals(country, "UK"))
                    {
                        output.Add("United Kingdom");      
                    }
                    else if (!country.ToLower(CultureInfo.CurrentCulture).Contains("imdb"))
                    {
                        output.Add(Tools.Clean.Text.ValidizeResult(country));
                    }
                }

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:rsanch1,项目名称:YANFOE.v2,代码行数:40,代码来源:IMDB.cs

示例10: ScrapeCast

        /// <summary>
        /// Scrapes the Cast collection.
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped Cast value.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeCast(string id, int threadID, out BindingList<PersonModel> output, string logCatagory)
        {
            output = new BindingList<PersonModel>();
            try
            {
                output = YRegex.MatchesToPersonList(
                    @"<img width=38 height=50 src=""(?<thumb>.{30,50})"" alt="".*?""></span>\s(?<name>.*?)\s</a></h3><div>\s(?<role>.*?)\s</div>",
                    this.GetHtml("main", threadID, id),
                    "name",
                    "role",
                    "thumb");

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:kamil7732,项目名称:YANFOE.v2,代码行数:28,代码来源:FilmWeb.cs

示例11: ScrapePoster

        /// <summary>
        /// Scrapes the poster image collection.
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped poster image collection.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapePoster(string id, int threadID, out BindingList<ImageDetailsModel> output, string logCatagory)
        {
            output = new BindingList<ImageDetailsModel>();
            try
            {
                var posterSmall = YRegex.Match(
                    @"<div\sclass=posterLightbox><a\srel=""v:image""\shref=""(?<poster>.*?)""\sclass=film_mini>",
                    this.GetHtml("main", threadID, id),
                    "poster");

                var posterBig = posterSmall.Replace(".2.jpg", ".3.jpg");

                output.Add(new ImageDetailsModel { UriFull = new Uri(posterBig), UriThumb = new Uri(posterSmall) });

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:kamil7732,项目名称:YANFOE.v2,代码行数:30,代码来源:FilmWeb.cs

示例12: ScrapeGenre

        /// <summary>
        /// Scrapes the Genre collection
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped Year collection.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeGenre(string id, int threadID, out BindingList<string> output, string logCatagory)
        {
            output = new BindingList<string>();
            try
            {
                output = YRegex.MatchesToList(
                    @"<a href=""/search/film\?genreIds=\d{1,2}"">(?<genre>.*?)</a",
                    this.GetHtml("main", threadID, id),
                    "genre",
                    true);

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:kamil7732,项目名称:YANFOE.v2,代码行数:27,代码来源:FilmWeb.cs

示例13: ScrapeFanart

        /// <summary>
        /// Scrapes the fanart image collection.
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped fanart image collection.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeFanart(string id, int threadID, out BindingList<ImageDetailsModel> output, string logCatagory)
        {
            output = new BindingList<ImageDetailsModel>();

            try
            {
                var fanartDownloadHtml =
                    Downloader.ProcessDownload(string.Format("http://www.kinopoisk.ru/level/12/film/{0}/", id), DownloadType.Html, Section.Movies).
                        RemoveCharacterReturn();

                var fanartMatches = YRegex.Matches(
                    @"/picture/(?<fanart>\d*?)/w_size/1024/", 
                    fanartDownloadHtml,
                    "fanart");

                foreach (var s in fanartMatches)
                {
                    var downloadFanartHtml =
                        Downloader.ProcessDownload(string.Format("http://www.kinopoisk.ru/picture/{0}/w_size/1024/", s), DownloadType.Html, Section.Movies).
                            RemoveCharacterReturn();

                    var match = Regex.Match(
                        downloadFanartHtml,
                        " src='(?<url>http://st.*?)' width='1024'");

                    if (match.Success)
                    {
                        output.Add(new ImageDetailsModel { UriFull = new Uri(match.Groups["url"].Value) });
                    }
                }

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:Acrisius,项目名称:YANFOE.v2,代码行数:47,代码来源:Kinopoisk.cs

示例14: ScrapePoster

        /// <summary>
        /// Scrapes the poster image collection.
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped poster image collection.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapePoster(string id, int threadID, out BindingList<ImageDetailsModel> output, string logCatagory)
        {
            output = new BindingList<ImageDetailsModel>();

            try
            {
                var posterDownloadHtml =
                    Downloader.ProcessDownload(string.Format("http://www.kinopoisk.ru/level/17/film/{0}/page/1/", id), DownloadType.Html, Section.Movies).
                        RemoveCharacterReturn();

                var posterDownloadHtml2 =
                    Downloader.ProcessDownload(string.Format("http://www.kinopoisk.ru/level/17/film/{0}/page/2/", id), DownloadType.Html, Section.Movies).
                        RemoveCharacterReturn();

                if (Regex.Match(posterDownloadHtml2, "#ff6600\"><b style=\"color:#ffffff\">2</b>").Success)
                {
                    posterDownloadHtml += posterDownloadHtml2;
                }

                var matches =
                    Regex.Matches(
                        @"<a href=""/picture/(?<number>\d*)/"" target=""_blank"" title="".*?""></a>",
                        posterDownloadHtml);

                foreach (string m in matches)
                {
                    var posterDownloadHtml3 =
                        Downloader.ProcessDownload(string.Format("http://www.kinopoisk.ru/picture/{0}/", m), DownloadType.Html, Section.Movies).
                            RemoveCharacterReturn();

                    var match = Regex.Match(posterDownloadHtml3, @"<tr><td width=\d*><a href="".*?""><img alt="".*?"" src='(?<imageurl>.*?)' width='\d*' height='\d*' style="".*?"" onload=''></a></td></tr>");

                    if (match.Success)
                    {
                        output.Add(new ImageDetailsModel { UriFull = new Uri(match.Groups["imageurl"].Value) });
                    }
                }

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:Acrisius,项目名称:YANFOE.v2,代码行数:54,代码来源:Kinopoisk.cs

示例15: ScrapeCast

        /// <summary>
        /// Scrapes the Cast collection.
        /// </summary>
        /// <param name="id">The MovieUniqueId for the scraper.</param>
        /// <param name="threadID">The thread MovieUniqueId.</param>
        /// <param name="output">The scraped Cast value.</param>
        /// <param name="logCatagory">The log catagory.</param>
        /// <returns>Scrape succeeded [true/false]</returns>
        public new bool ScrapeCast(string id, int threadID, out BindingList<PersonModel> output, string logCatagory)
        {
            output = new BindingList<PersonModel>();
            try
            {
                var htmlBlock = YRegex.Match(
                    @"<th scope=""col"">Bohater</th>(?<actorblock>.*?)zobacz więcej", 
                    this.GetHtml("main", threadID, id), 
                    "actorblock");

                htmlBlock = Regex.Replace(htmlBlock.Replace("\t", string.Empty), @"\s{2,}", " ");

                output = YRegex.MatchesToPersonList(
                    @"<img.*?rc=""(?<thumb>.*?)""\stitle="".*?""\salt=.*?>\s(?<name>.*?)</a></td>\s<td.*?>\s(?<role>.*?)\s<s.*?</tr>",
                    htmlBlock,
                    "name",
                    "role",
                    "thumb");

                return output.IsFilled();
            }
            catch (Exception ex)
            {
                Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message);
                return false;
            }
        }
开发者ID:Acrisius,项目名称:YANFOE.v2,代码行数:35,代码来源:FilmWeb.cs


注:本文中的BindingList.IsFilled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。