private void triggerMode_SelectionChanged(object sender, SelectionChangedEventArgs e) { var selectedItem = (AnimationTriggerMode)(sender as ComboBox).SelectedValue; if (CanSet) { Context.Properties._TriggerMode = selectedItem; } UpdateUI(); // If the evaluatable is not the correct type or it is null, then create the default Evaluatable for it if (AnimationLayerHandler.IsTriggerEvaluatableNumericValueBased(selectedItem) && !typeof(IEvaluatable <double>).IsAssignableFrom(Context.Properties._EvaluatableTrigger?.GetType())) { Context.Properties._EvaluatableTrigger = EvaluatableDefaults.Get <double>(); } else if (AnimationLayerHandler.IsTriggerEvaluatableBooleanValueBased(selectedItem) && !typeof(IEvaluatable <bool>).IsAssignableFrom(Context.Properties._EvaluatableTrigger?.GetType())) { Context.Properties._EvaluatableTrigger = EvaluatableDefaults.Get <bool>(); } // Update the evaluatable control triggerEvaluatable.EvalType = AnimationLayerHandler.IsTriggerEvaluatableNumericValueBased(selectedItem) ? typeof(double) : typeof(bool); triggerEvaluatable.Expression = Context.Properties._EvaluatableTrigger; }
public Boolean_Latch() : this(EvaluatableDefaults.Get<bool>(),EvaluatableDefaults.Get<bool>()) { }
public Boolean_FlipFlopT() : this(EvaluatableDefaults.Get <bool>()) { }