Exemplo 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);
     }
 }
        public void AddNewIpRange(object o)
        {
            Console.WriteLine(o.ToString());
            IpRangeTreeItemViewModel iprVM = new IpRangeTreeItemViewModel(Parent, new IpRange {
                Name = "IP Range"
            });

            Parent.Children.Add(iprVM);
        }
Exemplo n.º 3
0
 public IpRangeViewModel(IpRangeTreeItemViewModel dataModel)
 {
     DataModel = dataModel;
 }