本文整理汇总了C#中Search.StartSearching方法的典型用法代码示例。如果您正苦于以下问题:C# Search.StartSearching方法的具体用法?C# Search.StartSearching怎么用?C# Search.StartSearching使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Search
的用法示例。
在下文中一共展示了Search.StartSearching方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckForNewEpisodes
private AShow[] CheckForNewEpisodes(bool SearchAll, int MinSeeders)
{
ATorrent DLList = new ATorrent();
DLList.Torrents = new ATorrent[100];
int i = 0; int OGepi = 0;
ATorrent results = new ATorrent(35);
foreach (AShow t in Favorites.Shows)//Favorites.Shows)
{
if (t != null & t.MyType == "TV")
{
bool SearchAgain = true; OGepi = t.Episode;
while (SearchAgain == true)
{
SearchAgain = false;
t.Episode += 1;
Search search = new Search(t.ToString(), MinSeeders, SearchAll);
search.StartSearching();
results.Torrents = search.Results.Torrents;
if (results.Torrents[0] != null && results.Torrents[0].Name != "No Results Found!")
{
if (results.Torrents[0].Name != "9999" & results.ExactMatch(t) != 9999)
{
if (DLList.ExactMatch(t) == 9999)
{
DLList.Add(results.Torrents[0]);
SearchAgain = SearchAll;//true to keep searching for the next episode
}
}
}
}
t.Episode = OGepi;
i++;
int poss = 0;
foreach (AShow x in Favorites.Shows) { if (x != null) { poss++; } else break; }
float a = poss;
float b = i;
int c = Convert.ToInt32((b / a) * 100);
bgw_SearchForNewEpisodes.ReportProgress(c);
}
else break;
}
return DLList.Torrents;
}
示例2: bgw_Search_DoWork
private void bgw_Search_DoWork(object sender, DoWorkEventArgs e)
{
Search search = new Search(e.Argument.ToString(), Int32.Parse(txtbxMinSeeders.Text.ToString()), chkbx_FilterResults.Checked);
search.StartSearching();
e.Result = search.Results;
}