public ReadOnlyConditionGroup(AbstractConditionGroup sourceGroup) : base(sourceGroup) { this.sourceGroup = sourceGroup; If = new ReadOnlyExpressionCondition(sourceGroup.If); sourceGroup.PropertyChanged += OnSourcePropertyChanged; if (null != sourceGroup.Else) { Else = new ReadOnlyBasicCondition(sourceGroup.Else); } }
private void OnSourcePropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == "Else") { if (null != sourceGroup.Else) { Else = new ReadOnlyBasicCondition(sourceGroup.Else); } else { Else = null; } } }