本文整理汇总了C#中WikiFunctions.Controls.Lists.ListMaker类的典型用法代码示例。如果您正苦于以下问题:C# ListMaker类的具体用法?C# ListMaker怎么用?C# ListMaker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ListMaker类属于WikiFunctions.Controls.Lists命名空间,在下文中一共展示了ListMaker类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: DatabaseScanner
public DatabaseScanner(ListMaker lm)
: this()
{
listMaker = lm;
if (lm != null)
AWBListbox = lm.Items;
}
开发者ID:svn2github,项目名称:autowikibrowser,代码行数:7,代码来源:DatabaseScanner.cs
示例2: ListComparer
/// <summary>
///
/// </summary>
/// <param name="lmMain"></param>
public ListComparer(ListMaker lmMain)
{
InitializeComponent();
if (lmMain != null)
{
btnMoveOnly1.Enabled = btnMoveOnly2.Enabled = btnMoveCommon.Enabled = true;
_mainFormListMaker = lmMain;
}
listMaker1.MakeListEnabled = true;
listMaker2.MakeListEnabled = true;
}
开发者ID:svn2github,项目名称:autowikibrowser,代码行数:17,代码来源:ListComparer.cs
示例3: ListComparer
/// <summary>
///
/// </summary>
/// <param name="lmMain"></param>
public ListComparer(ListMaker lmMain)
{
InitializeComponent();
if (lmMain != null)
_mainFormListMaker = lmMain;
listMaker1.MakeListEnabled = true;
listMaker2.MakeListEnabled = true;
listMaker1.NoOfArticlesChanged +=UpdateButtons;
listMaker2.NoOfArticlesChanged +=UpdateButtons;
// ensure button enablement of Remove, Filter correct in list maker when opened with no articles in
listMaker1.UpdateNumberOfArticles();
listMaker2.UpdateNumberOfArticles();
}
开发者ID:svn2github,项目名称:autowikibrowser,代码行数:20,代码来源:ListComparer.cs
示例4: RemoveListDuplicatesSimple
public void RemoveListDuplicatesSimple()
{
ListMaker LMakerRLD = new ListMaker();
LMakerRLD.Add(new Article("A"));
LMakerRLD.Add(new Article("B"));
LMakerRLD.Add(new Article("C"));
LMakerRLD.Add(new Article("A"));
LMakerRLD.RemoveListDuplicates();
Assert.AreEqual(LMakerRLD.Count, 3, "Duplicate removed");
foreach(Article a in LMakerRLD)
{
Assert.AreEqual(a, "A", "Duplicates removed from end of list");
break;
}
}
开发者ID:svn2github,项目名称:awb,代码行数:17,代码来源:MiscellaneousTests.cs
示例5: RemoveListDuplicates10K
public void RemoveListDuplicates10K()
{
const int big = 10000;
ListMaker LMakerLarge = new ListMaker();
LMakerLarge.Clear();
for(int i=1; i<big; i++)
LMakerLarge.Add(new Article(i.ToString()));
LMakerLarge.Add(new Article("1"));
Assert.AreEqual(LMakerLarge.Count, big);
LMakerLarge.RemoveListDuplicates();
Assert.AreEqual(LMakerLarge.Count, big-1, "Duplicate removed");
Assert.IsTrue(LMakerLarge.Contains(new Article("1")), "First instance of article retained");
}
开发者ID:svn2github,项目名称:awb,代码行数:17,代码来源:MiscellaneousTests.cs
示例6: GetArticleList
public void GetArticleList()
{
ListMaker LMaker = new ListMaker();
LMaker.Add("A");
LMaker.Add("B");
Assert.AreEqual(2, LMaker.GetArticleList().Count);
LMaker.Items.SetSelected(0, true);
LMaker.Items.SetSelected(1, true);
Assert.AreEqual(2, LMaker.GetSelectedArticleList().Count);
LMaker.Items.SetSelected(1, false);
Assert.AreEqual(1, LMaker.GetSelectedArticleList().Count);
Assert.AreEqual(2, LMaker.GetArticleList().Count);
}
开发者ID:svn2github,项目名称:awb,代码行数:18,代码来源:MiscellaneousTests.cs
示例7: FilterNonMainArticlesVolume
public void FilterNonMainArticlesVolume()
{
const int big = 500;
ListMaker LMakerLarge = new ListMaker();
LMakerLarge.Clear();
for(int i=1; i<big; i++)
LMakerLarge.Add(i.ToString());
LMakerLarge.Add("Talk:Me");
LMakerLarge.FilterNonMainArticles();
Assert.AreEqual(LMakerLarge.Count, big-1, "Non-mainspace article removed");
}
开发者ID:svn2github,项目名称:awb,代码行数:13,代码来源:MiscellaneousTests.cs
示例8: NormalizeTitle
public void NormalizeTitle()
{
ListMaker LMaker = new ListMaker();
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&diff=3&oldid=4"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&diff=3&curid=4"));
Assert.AreEqual("Health effects of chocolate", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Health_effects_of_chocolate&diff=4018&oldid=40182"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&action=history"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&action=edit"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&oldid=5"));
Assert.AreEqual("Science (journal)", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Science%20%28journal%29&action=history"));
Assert.AreEqual(@"Wikipedia:AutoWikiBrowser/Sandbox", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Wikipedia:AutoWikiBrowser/Sandbox&action=edit"));
Assert.AreEqual(@"Wikipedia:AutoWikiBrowser/Sandbox", LMaker.NormalizeTitle(@"en.wikipedia.org/w/index.php?title=Wikipedia:AutoWikiBrowser/Sandbox&action=edit"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo#References"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@" Foo"), "cleans spacing from Firefox Category paste");
Assert.AreEqual(@"Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&pe=1&#Date_on"));
Assert.AreEqual(@"Foo", LMaker.NormalizeTitle(@"Foo"), "title has left-to-right mark at the end");
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&offset=20130214190000&action=history"), "cleans spacing from Firefox Category paste");
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/?title=Foo"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/wiki/Foo"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"http://en.wikipedia.org/wiki/Foo"), "HTTP not HTTPS support");
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"//en.wikipedia.org/w/index.php?title=Foo&action=history"), "Protocol-relative support");
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&redirect=no"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&type=revision&diff=75558108&oldid=65316243"));
Assert.AreEqual("#[[Foo]]", LMaker.NormalizeTitle(@"#[[Foo]]"), "#wikilinked");
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"Foo#bar"), "#wikilinked");
}
开发者ID:reedy,项目名称:AutoWikiBrowser,代码行数:31,代码来源:MiscellaneousTests.cs
示例9: AddList
public void AddList()
{
ListMaker LMaker = new ListMaker();
List<Article> l = new List<Article>();
l.Add(new Article("A"));
l.Add(new Article("B"));
LMaker.Add("A");
LMaker.Add("B");
LMaker.FilterDuplicates = true;
LMaker.Add(l);
Assert.AreEqual(2, LMaker.NumberOfArticles);
l.Add(new Article("C"));
LMaker.Add(l);
Assert.AreEqual(3, LMaker.NumberOfArticles);
l.Add(new Article("C"));
l.Add(new Article("C"));
l.Add(new Article("C"));
l.Add(new Article("C"));
LMaker.Add("D");
LMaker.Add(l);
Assert.AreEqual(4, LMaker.NumberOfArticles);
}
开发者ID:svn2github,项目名称:awb,代码行数:28,代码来源:MiscellaneousTests.cs
示例10: ListComparerSimple
public void ListComparerSimple()
{
ListMaker LMaker = new ListMaker();
LMaker.Add(new Article("A"));
LMaker.Add(new Article("B"));
LMaker.Add(new Article("C"));
LMaker.Add(new Article("C")); // duplicate, removed during compare
System.Windows.Forms.ListBox lb1 = new System.Windows.Forms.ListBox();
System.Windows.Forms.ListBox lb2 = new System.Windows.Forms.ListBox();
System.Windows.Forms.ListBox lb3 = new System.Windows.Forms.ListBox();
List<Article> articles = new List<Article>();
articles.Add(new Article("A"));
articles.Add(new Article("D"));
articles.Add(new Article("E"));
ListComparer.CompareLists(LMaker, articles, lb1, lb2, lb3);
// unique in 1
Assert.IsTrue(lb1.Items.Contains("B"));
Assert.IsTrue(lb1.Items.Contains("C"));
Assert.IsFalse(lb1.Items.Contains("A"));
Assert.AreEqual(lb1.Items.Count, 2);
// unique in 2
Assert.IsFalse(lb2.Items.Contains("A"));
Assert.IsTrue(lb2.Items.Contains("D"));
Assert.IsTrue(lb2.Items.Contains("E"));
Assert.AreEqual(lb2.Items.Count, 2);
// common to both
Assert.IsTrue(lb3.Items.Contains("A"));
Assert.AreEqual(lb3.Items.Count, 1);
}
开发者ID:svn2github,项目名称:awb,代码行数:34,代码来源:MiscellaneousTests.cs
示例11: ListComparer10K
public void ListComparer10K()
{
const int big = 10000;
ListMaker LMakerC10K = new ListMaker();
for(int i=0; i<big; i++)
LMakerC10K.Add(new Article(i.ToString()));
LMakerC10K.Add(new Article("A"));
LMakerC10K.Add(new Article("B"));
System.Windows.Forms.ListBox lb1 = new System.Windows.Forms.ListBox();
System.Windows.Forms.ListBox lb2 = new System.Windows.Forms.ListBox();
System.Windows.Forms.ListBox lb3 = new System.Windows.Forms.ListBox();
List<Article> articlesC = new List<Article>();
for(int i=0; i<big; i++)
articlesC.Add(new Article(i.ToString()));
articlesC.Add(new Article("C"));
articlesC.Add(new Article("D"));
ListComparer.CompareLists(LMakerC10K, articlesC, lb1, lb2, lb3);
// unique in 1
Assert.IsTrue(lb1.Items.Contains("A"));
Assert.IsTrue(lb1.Items.Contains("B"));
// unique in 2
Assert.IsTrue(lb2.Items.Contains("C"));
Assert.IsTrue(lb2.Items.Contains("D"));
// common to both
Assert.IsTrue(lb3.Items.Contains("1"));
Assert.AreEqual(lb3.Items.Count, big);
}
开发者ID:svn2github,项目名称:awb,代码行数:36,代码来源:MiscellaneousTests.cs
示例12: Initialise
public void Initialise(ListMaker rlistMaker)
{
_listMaker = rlistMaker;
ResizeListView(lvFailed);
ResizeListView(lvSuccessful);
}
开发者ID:svn2github,项目名称:autowikibrowser,代码行数:6,代码来源:ArticleActionLogControl.cs
示例13: AddListToListMaker
private void AddListToListMaker(ListMaker lm, IEnumerable<Article> lb)
{
List<Article> articles = new List<Article>();
articles.AddRange(lb);
lm.Add(articles);
}
开发者ID:svn2github,项目名称:autowikibrowser,代码行数:6,代码来源:ListComparer.cs
示例14: NormalizeTitleSecure
public void NormalizeTitleSecure()
{
ListMaker LMaker = new ListMaker();
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&diff=3&oldid=4"));
}
开发者ID:reedy,项目名称:AutoWikiBrowser,代码行数:5,代码来源:MiscellaneousTests.cs
示例15: Initialise
public void Initialise(ListMaker rlistMaker)
{
listMaker = rlistMaker;
resizeListView(lvIgnored);
resizeListView(lvSaved);
}
开发者ID:svn2github,项目名称:autowikibrowser,代码行数:6,代码来源:LogControl.cs
示例16: DatabaseScannerListProvider
/// <summary>
/// Default constructor
/// </summary>
/// <param name="lm">ListMaker for DBScanner to add articles to</param>
public DatabaseScannerListProvider(ListMaker lm)
{
LMaker = lm;
}
开发者ID:svn2github,项目名称:autowikibrowser,代码行数:8,代码来源:ListProviders.cs
示例17: FilterNonMainArticles
public void FilterNonMainArticles()
{
ListMaker LMaker = new ListMaker();
LMaker.Add("One");
LMaker.Add("Two");
LMaker.Add("Talk:Three");
LMaker.Add("Four");
LMaker.Add("Talk:Five");
LMaker.Add("Talk:Five2");
LMaker.Add("Six");
LMaker.FilterNonMainArticles();
Assert.AreEqual(4, LMaker.NumberOfArticles);
}
开发者ID:svn2github,项目名称:awb,代码行数:14,代码来源:MiscellaneousTests.cs
注:本文中的WikiFunctions.Controls.Lists.ListMaker类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论