示例#1
0
        private void _model_StructureChanged(object sender, TreePathEventArgs e)
        {
            if (e.Path == null)
                throw new ArgumentNullException();

            TreeNodeAdv node = FindNode(e.Path);
            if (node != null)
            {
                if (node != Root)
                    node.IsLeaf = Model.IsLeaf(GetPath(node));

                var list = new Dictionary<object, object>();
                SaveExpandedNodes(node, list);
                ReadChilds(node);
                RestoreExpandedNodes(node, list);

                UpdateSelection();
                SmartFullUpdate();
            }
            //else
            //	throw new ArgumentException("Path not found");
        }
示例#2
0
文件: TreeModel.cs 项目: Tokter/TokED
 public void OnStructureChanged(TreePathEventArgs args)
 {
     if (StructureChanged != null)
         StructureChanged(this, args);
 }
示例#3
0
 void _innerModel_StructureChanged(object sender, TreePathEventArgs e)
 {
     OnStructureChanged(e);
 }