/// <summary> /// Cria um nó para a raiz da árvore. /// </summary> /// <param name="tree"></param> /// <param name="item"></param> internal TreeViewSourceNode(TreeViewSource tree, object item) { _tree = tree; _item = item; _isExpanded = true; Initialize(); _isExpanded = true; }
/// <summary> /// Verifica se as chaves informadas são iguais. /// </summary> /// <param name="tree"></param> /// <param name="key1"></param> /// <param name="key2"></param> /// <returns></returns> private static bool KeysEquals(TreeViewSource tree, object key1, object key2) { if (tree.KeyEqualityComparer != null) { return(tree.KeyEqualityComparer.Equals(key1, key2)); } return((key1 == null && key2 == null) || (key1 != null && key1.Equals(key2)) || (key2 != null && key2.Equals(key1))); }
/// <summary> /// Construtor padrão. /// </summary> /// <param name="node"></param> public Enumerator(TreeViewSourceNode node) { _tree = node.GetTree(); _node = node; }
/// <summary> /// Construtor padrão. /// </summary> /// <param name="owner"></param> public ReentracyMonitor(TreeViewSource owner) { _owner = owner; lock (_owner._reentrancyThreads) _owner._reentrancyThreads.Add(System.Threading.Thread.CurrentThread); }