예제 #1
0
 /// <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;
 }
예제 #2
0
 /// <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)));
 }
예제 #3
0
 /// <summary>
 /// Construtor padrão.
 /// </summary>
 /// <param name="node"></param>
 public Enumerator(TreeViewSourceNode node)
 {
     _tree = node.GetTree();
     _node = node;
 }
예제 #4
0
 /// <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);
 }