protected VariableBindingProcessor(BindingInfo bindingInfo, Component context) { processedVariable = new ObservableVariable <TTo>(); ViewModel = new OperatorVariableViewModel <TTo>(processedVariable); variableBinding = new VariableBinding <TFrom>(bindingInfo, context); variableBinding.Property.Changed += BoundVariableChangedHandler; }
protected virtual void Awake() { exposedProperty = new ObservableVariable <TTo>(); ViewModel = new OperatorVariableViewModel <TTo>(exposedProperty); bindingList = new BindingList <TFrom>(this, fromBinding); bindingList.VariableChanged += BindingListVariableChangedHandler; }
protected override void Awake() { base.Awake(); exposedVariable = new ObservableVariable <bool>(); ViewModel = new OperatorVariableViewModel <bool>(exposedVariable); variableBinding = new VariableBinding <object>(variable, this); variableBinding.Property.Changed += OnVariableChanged; variableBinding.Property.Cleared += OnVariableCleared; }
protected virtual void Awake() { result = new ObservableVariable <bool>(); viewModel = new OperatorVariableViewModel <bool>(result); ViewModel = viewModel; operandABinding = new VariableBinding <double>(operandA, this); operandABinding.Property.Changed += OperandChangedHandler; operandBBinding = new VariableBinding <double>(operandB, this); operandBBinding.Property.Changed += OperandChangedHandler; }
protected virtual void Awake() { exposedProperty = new ObservableVariable <string>(); ViewModel = new OperatorVariableViewModel <string>(exposedProperty); formatBinding = new VariableBinding <string>(format, this); formatBinding.Property.Changed += OnFormatChanged; parametersBindingList = new BindingList <object>(this, parameters); parametersBindingList.VariableChanged += OnBindingListVariableChanged; }
protected override void Awake() { base.Awake(); RegisterVariable <T>(source) .OnChanged(OnBoundPropertyChanged) .OnCleared(OnBoundPropertyCleared); initialBinding = new VariableBinding <T>(InitialValue, this); exposedProperty = new ObservableVariable <T>(); ViewModel = new OperatorVariableViewModel <T>(exposedProperty); }
private bool Evaluate() { bool result = false; switch (operation) { case MathComparisonType.Equals: result = A == B; break; case MathComparisonType.NotEquals: result = A != B; break; case MathComparisonType.Greater: result = A > B; break; case MathComparisonType.GreaterOrEquals: result = A >= B; break; case MathComparisonType.Less: result = A < B; break; case MathComparisonType.LessOrEquals: result = A <= B; break; } return(result); }
public CommandBinding(BindingInfo bindingInfo, Component context) : base(bindingInfo, context) { canExecuteSource = new ObservableVariable <bool>(false); exposedProperty = new ObservableCommand(canExecuteSource, OnExecuteRequested); }
public VariableBinding(BindingInfo bindingInfo, Component context) : base(bindingInfo, context) { exposedProperty = new ObservableVariable <T>(); }