本文整理汇总了C#中TreeListNode.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# TreeListNode.GetType方法的具体用法?C# TreeListNode.GetType怎么用?C# TreeListNode.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TreeListNode
的用法示例。
在下文中一共展示了TreeListNode.GetType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadWorking
private FolderNode LoadWorking(TreeListNode parent, LocalFolder folder)
{
FolderNode node = new FolderNode(this, folder.Info, parent, false);
node.Archived = folder.Archived;
node.Integrated = folder.Integrated;
if (SelectedFolder != null && node.Details.UID == SelectedFolder.Details.UID)
{
node.Selected = true;
SelectedFolder = node;
}
if (!folder.Info.IsFlagged(StorageFlags.Archived) || GhostsButton.Checked)
GuiUtils.InsertSubNode(parent, node);
if (parent.GetType() == typeof(FolderNode))
{
FolderNode parentNode = (FolderNode)parent;
parentNode.Folders[folder.Info.UID] = node;
}
if (node.Details.IsFlagged(StorageFlags.Modified))
node.EnsureVisible();
folder.Folders.LockReading(delegate()
{
foreach (LocalFolder sub in folder.Folders.Values)
LoadWorking(node, sub);
});
folder.Files.LockReading(delegate()
{
foreach (LocalFile file in folder.Files.Values)
{
FileItem item = new FileItem(this, node, file.Info, false);
item.Archived = file.Archived;
item.Integrated = file.Integrated;
node.Files[file.Info.UID] = item;
}
});
return node;
}
示例2: RecurseFocus
void RecurseFocus(TreeListNode parent)
{
// add parent to focus list
if (parent.GetType() == typeof(LinkNode))
Core.KeepData.SafeAdd(((LinkNode)parent).Link.UserID, true);
// iterate through sub items
foreach (TreeListNode subitem in parent.Nodes)
if (parent.GetType() == typeof(LinkNode))
RecurseFocus(subitem);
}