コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: Boolean_Latch.cs プロジェクト: supergrml/Aurora
 public Boolean_Latch() : this(EvaluatableDefaults.Get<bool>(),EvaluatableDefaults.Get<bool>()) { }
コード例 #3
0
 public Boolean_FlipFlopT() : this(EvaluatableDefaults.Get <bool>())
 {
 }