protected virtual void OnSelectedNodeChanged(NodeBase oldNode, NodeBase newNode)
 {
 }
 private void OnCategoryBreadcrumbItemSelected(object sender, RoutedPropertyChangedEventArgs<BreadcrumbItem> e)
 {
     if (e.NewValue != null)
     {
         NodeBase node = e.NewValue.Data as NodeBase;
         SelectedNode = node;
     }
 }
 protected virtual void OnBreadcrumbRootChanged(object sender, NodeBase oldNode, NodeBase newNode)
 {
     BreadcrumbHierarchy = UIContext.GetBreadcrumbDropDownData(newNode);
 }
Beispiel #4
0
        private void InitializeDataAsync()
        {
            var ctx = SynchronizationContext.Current;
            ThreadPool.QueueUserWorkItem(state =>
            {
                // this runs in a separate thread:
                var bcRoot = Domain.Nodes;
                var categories = new CategoryBase[] { Domain.RootCategory };
                var rootFolders = new NodeBase[] { Domain.RootFolder };
                var rootCategory = Domain.RootCategory;

                ctx.Post(ctxState =>
                {
                    // this runs in the application thread:
                    categoriesTree.SelectFirst();
                }, null);
            });
        }
Beispiel #5
0
 protected virtual void OnSelectedNodeChanged(NodeBase oldNode, NodeBase newNode)
 {
     SelectedCategory = newNode as Category;
     SelectedFolder = newNode as Folder;
 }
 private void UpdatePasswords(NodeBase newNode)
 {
     Category c = newNode as Category;
     if (c != null)
     {
         SetPasswords(c.NestedPasswords);
     }
     else
     {
         Folder f = newNode as Folder;
         SetPasswords(f != null ? f.NestedPasswords : null);
     }
 }
 protected virtual void OnSelectedNodeChanged(NodeBase oldNode, NodeBase newNode)
 {
     PasswordsListView.SelectedIndex = 0;
     UpdatePasswords(newNode);
     if (newNode != null)
     {
         newNode.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(newNode_PropertyChanged);
     }
     if (oldNode != null)
     {
         oldNode.PropertyChanged -= newNode_PropertyChanged;
     }
 }
 protected virtual void OnBreadcrumbRootChanged(NodeBase oldNode, NodeBase newNode)
 {
     BreadcrumbHierarchy = UIContext.GetBreadcrumbDropDownData(newNode);
     CategoryHierarchy = UIContext.GetBreadcrumbDropDownData(BizContext.Instance.Categories.FirstOrDefault());
 }