예제 #1
0
        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();
        }
예제 #2
0
 public void DeleteCondition(LayerConditionViewModel layerConditionViewModel,
     LayerConditionModel layerConditionModel)
 {
     LayerConditionVms.Remove(layerConditionViewModel);
     Layer.Properties.Conditions.Remove(layerConditionModel);
 }
예제 #3
0
 public void AddCondition()
 {
     var condition = new LayerConditionModel();
     LayerConditionVms.Add(new LayerConditionViewModel(this, condition));
 }