public void EditKeyPropertyOperation_Test() { var vertex = new DataVertex(); var property = new PropertyViewmodel(1, "key", "value", vertex); vertex.AddProperty(property); var ekpo = new EditKeyPropertyOperation(property, "key changed"); ekpo.Do(); Assert.AreEqual(property.Key, "key changed"); ekpo.UnDo(); Assert.AreEqual(property.Key, "key"); }
public PropertyViewmodel AddProperty(PropertyViewmodel property = null) { if (Properties == null) { Properties = new ObservableCollection <PropertyViewmodel>(); } if (property == null) { property = NewProperty(); } Properties.Add(property); IsExpanded = true; DeleteCommand.RaiseCanExecuteChanged(); return(property); }
public EditKeyPropertyOperation(PropertyViewmodel property = null, string key = "") : base(null, property) { base.Sammary = "Edit Property Key"; _key = key; }
public void EditValuePropertyOperation_Test() { var vertex = new DataVertex(); var property = new PropertyViewmodel(1, "key", "value", vertex); vertex.AddProperty(property); var evpo = new EditValuePropertyOperation(property, "value changed"); evpo.Do(); Assert.AreEqual(property.Value, "value changed"); evpo.UnDo(); Assert.AreEqual(property.Value, "value"); }
public EditValuePropertyOperation(PropertyViewmodel property = null, string value = "") : base(null, property) { base.Sammary = "Edit Property Value"; _value = value; }
public virtual void Dispose() { _property = null; _vertex = null; }
public PropertyOperation(DataVertex vertex, PropertyViewmodel property) { _property = property; _vertex = vertex; }
public AddPropertyOperation(DataVertex vertex, PropertyViewmodel property = null) : base(vertex, property) { base.Sammary = "Add Property"; }
private void Update(PropertyViewmodel vm) { Update(vm.OriginalKey, vm.Key, vm.Value); }
public PropertyViewmodel RemoveProperty(PropertyViewmodel property) { Properties.Remove(property); return(property); }