private void AddItemsToNode(TreeViewItem node, CrawlerItem item)
 {
     if (item.Items != null)
     {
         for (int j = 0; j < item.Items.Count; j++)
         {
             TreeViewItem childNode = new TreeViewItem()
             {
                 Header = item.Items[j].Title
             };
             node.Items.Add(childNode);
             if (item.Items[j].Items != null)
             {
                 AddItemsToNode(childNode, item.Items[j]);
             }
         }
     }
 }
예제 #2
0
 public bool IsContains(CrawlerItem item)
 {
     return(_list.Find(i => i.Url == item.Url) != null);
 }
예제 #3
0
 public void Add(CrawlerItem item)
 {
     _list.Add(item);
 }