Ejemplo n.º 1
0
 public void SelectedItemChanged(object o)
 {
     //ActiveItem = obj;
     Console.WriteLine(o.ToString());
     if (o is GroupTreeItemViewModel)
     {
         GroupTreeItemViewModel g   = o as GroupTreeItemViewModel;
         GroupViewModel         gVM = new GroupViewModel(g);
         ActivateItem(gVM);
         //ActivateItem(o);
     }
     else if (o is CollectionPointTreeItemViewModel)
     {
         CollectionPointTreeItemViewModel c   = o as CollectionPointTreeItemViewModel;
         CollectionPointViewModel         gVM = new CollectionPointViewModel(c);
         ActivateItem(gVM);
         //ActivateItem(o);
     }
     else if (o is IpRangeTreeItemViewModel)
     {
         IpRangeTreeItemViewModel ip  = o as IpRangeTreeItemViewModel;
         IpRangeViewModel         gVM = new IpRangeViewModel(ip);
         ActivateItem(gVM);
         //ActivateItem(o);
     }
 }
Ejemplo n.º 2
0
        public void AddNewCollectionPoint(object o)
        {
            CollectionPointTreeItemViewModel cpVM = new CollectionPointTreeItemViewModel(Parent, new CollectionPoint {
                Name = "New Collection Point"
            });

            Parent.Children.Add(cpVM);
        }
Ejemplo n.º 3
0
 public CollectionPointViewModel(CollectionPointTreeItemViewModel dataModel)
 {
     DataModel = dataModel;
 }
 public IpRangeTreeItemViewModel(CollectionPointTreeItemViewModel parent)
     : this(parent, new IpRange {
     Name = "New IP Range"
 })
 {
 }
 public IpRangeTreeItemViewModel(CollectionPointTreeItemViewModel parent, IpRange dataModel)
 {
     Parent    = parent;
     DataModel = dataModel;
 }