Esempio n. 1
0
        private List <ObjectViewModel> GetAllItems(ObjectViewModel ovm)
        {
            List <ObjectViewModel> results = new List <ObjectViewModel>();

            foreach (var item in ovm.Children)
            {
                results.Add(item);
                results.AddRange(GetAllItems(item));
            }
            return(results);
        }
Esempio n. 2
0
 public ObjectViewModel(ArchestrAObject obj, ObjectViewModel parent)
 {
     _object  = obj;
     _parent  = parent;
     Children = new ReadOnlyCollection <ObjectViewModel>((from child in _object.Children select new ObjectViewModel(child, this)).ToList());
 }