Exemple #1
0
 public virtual void NotifyChange(object sourceObj, BindingEventArgs args)
 {
     if (IsSourceVar(sourceObj, args.VarName))
     {
         T1 sourceValue = source.Object.GetVariable <T1>(source.Var);
         T2 newValue    = arrow.Invoke(sourceValue);
         TrySetVariable(destination, newValue);
     }
 }
Exemple #2
0
        public void SendUpdate(string varName)
        {
            NotifyPropertyChanged(varName);
            BindingEventArgs args = new BindingEventArgs(varName);

            if (valueChanged != null)
            {
                valueChanged(this, args);
            }
        }
Exemple #3
0
 public override void NotifyChange(object sourceObj, BindingEventArgs args)
 {
     base.NotifyChange(sourceObj, args);  // Will do the forward change if the changed
                                          // object is the binding source
     // Otherwise we check if it's the destination variable, and if so run the arrow in
     // reverse
     if (IsDestinationVar(sourceObj, args.VarName))
     {
         T2 sourceValue = destination.Object.GetVariable <T2>(destination.Var);
         T1 newValue    = reverseArrow.Invoke(sourceValue);
         TrySetVariable(source, newValue);
     }
 }
Exemple #4
0
        public virtual void NotifyChange(Bindable sourceObj, BindingEventArgs args)
        {
            if (IsSourceVar(sourceObj, args.VarName))
            {
                var arguments    = new List <BindPoint>(sources);
                var sourcesTuple = BindingArgumentMarshaller.MarshalArguments(arguments, arrow.a);

                dynamic        rawResults = arrow.Invoke(sourcesTuple);
                List <dynamic> results    = BindingArgumentMarshaller.UnmarshalArguments(rawResults);

                UpdateDestinations(results);
            }
        }
Exemple #5
0
        public override void NotifyChange(Bindable sourceObj, BindingEventArgs args)
        {
            base.NotifyChange(sourceObj, args);  // Will do the forward change if the changed
                                                 // object is the binding source
            // Otherwise we check if it's the destination variable, and if so run the arrow in
            // reverse
            if (IsDestinationVar(sourceObj, args.VarName))
            {
                var arguments         = new List <BindPoint>(destinations);
                var destinationsTuple = BindingArgumentMarshaller.MarshalArguments(arguments, arrow.b);

                dynamic        rawResults = reverseArrow.Invoke(destinationsTuple);
                List <dynamic> results    = BindingArgumentMarshaller.UnmarshalArguments(rawResults);

                UpdateSources(results);
            }
        }