コード例 #1
0
 /// <summary>
 /// Class constructor
 /// </summary>
 /// <param name="name"></param>
 public FileViewModel(
     IFSItemViewModel parent
     , string name)
 {
     _parent   = parent;
     _Name     = name;
     _Children = new SortableObservableDictionaryCollection();
 }
コード例 #2
0
 /// <summary>
 /// Class constructor
 /// </summary>
 public DirSubTreeViewModel(IDirSubTreeViewModel parent, DirSubTree dirSubTree)
 {
     _dirSubTree = dirSubTree;
     _parent     = parent;
     _children   = new SortableObservableDictionaryCollection();
     foreach (DirSubTree child in _dirSubTree.Children)
     {
         _children.AddItem(new DirSubTreeViewModel(this, child));
     }
 }
コード例 #3
0
 /// <summary>
 /// Adds another child into the collection of items.
 /// </summary>
 /// <param name="item"></param>
 public void AddChildItem(IFSItemViewModel item)
 {
     _children.AddItem(item);
 }
コード例 #4
0
 /// <summary>
 /// Adds or replaces the current rootItem in the ViewModel.
 /// </summary>
 /// <param name="item"></param>
 public void AddRoot(IFSItemViewModel item)
 {
     _Root.Clear();
     _rootItem = item;
     _Root.Add(item);
 }