public LayerConditionViewModel(LayerEditorViewModel conditionModel, LayerConditionModel layerConditionModel) { _conditionModel = conditionModel; _preselecting = false; LayerConditionModel = layerConditionModel; DataModelProps = conditionModel.DataModelProps; Operators = new BindableCollection<NamedOperator>(); Enums = new BindableCollection<string>(); PropertyChanged += UpdateModel; PropertyChanged += UpdateForm; PreSelect(); }
public void DeleteCondition(LayerConditionViewModel layerConditionViewModel, LayerConditionModel layerConditionModel) { LayerConditionVms.Remove(layerConditionViewModel); Layer.Properties.Conditions.Remove(layerConditionModel); }
public void AddCondition() { var condition = new LayerConditionModel(); LayerConditionVms.Add(new LayerConditionViewModel(this, condition)); }