Exemplo n.º 1
0
        public ConditionSelectionMasterModel(ConditionService service)
        {
            Selector = new ConditionSelectorModel(service);
            Editor = new ConditionEditorModel(service);

            Selector.Edit += OnEdit;
        }
Exemplo n.º 2
0
        protected void SetModel(object sender, DependencyPropertyChangedEventArgs e)
        {
            Model = DataContext as ConditionEditorModel;
            if (Model == null) return;

            Model.OnEditComponentModel += EditComponentModel;
            Model.OnDeleteComponentModel += DeleteComponentModel;
            Model.OnConditionSelected += ConditionSelected;

            ComponentEditor.DataContext = Model.EditorModel;
            ConditionSelector.DataContext = Model.ConditionSelectorModel;
        }