Example #1
0
 public Node_ViewModel()
 {
     if (IsInDesignMode)
     {
         Labels = new ObservableCollection <string> {
             "Alpha", "Beta", "Gaga"
         };
         Id = 101;
         dynamic d = new ExpandoObject();
         d.Alpha               = "alpha property";
         d.Beta                = "beta property";
         d.Gamma               = "Gamma property";
         Properties            = new Properties_ViewModel(_node);
         AddLabelText          = "New Label";
         IncomingRelationships = new List <Relationship_ViewModel>
         {
             new Relationship_ViewModel("alpha"),
             new Relationship_ViewModel("beta")
         };
         OutgoingRelationships = new List <Relationship_ViewModel>
         {
             new Relationship_ViewModel("gamma"),
             new Relationship_ViewModel("delta")
         };
     }
 }
Example #2
0
 public Node_ViewModel(Client.Node node)
     : this()
 {
     _node              = node;
     Properties         = new Properties_ViewModel(_node);
     DeleteCommand      = new RelayCommand(Delete, DeleteEnabled);
     AddLabelCommand    = new RelayCommand(AddLabel);
     RemoveLabelCommand = new RelayCommand <string>(RemoveLabel, RemoveLabelEnabled);
     _deleted           = false;
     Init();
 }
 public Relationship_ViewModel(Client.Relationship rel)
 {
     _rel       = rel;
     _type      = _rel.Type;
     Properties = new Properties_ViewModel(_rel);
 }