Exemple #1
0
        ///// <summary>
        /////
        ///// </summary>
        //public List<GLField<T>> Destinations
        //{
        //    get { return destinations; }
        //}

        /// <summary>
        /// I will notify specified <paramref name="destination"/> when my Value changes.
        /// </summary>
        /// <param name="destination"></param>
        public void ConnectTo(GLField <T> destination)
        {
            if (destination != null)
            {
                destination.Source = this;
                this.destinations.Add(destination);
            }
        }
Exemple #2
0
 /// <summary>
 /// I need to update my value when specified <paramref name="source"/>'s value is changed.
 /// </summary>
 /// <param name="source"></param>
 public void ConnectFrom(GLField <T> source)
 {
     if (source != null)
     {
         this.Source = source;
         source.destinations.Add(this);
     }
     else
     {
         var current = this.Source;
         if (current != null)
         {
             this.Source = null;
             current.destinations.Remove(this);
         }
     }
 }
Exemple #3
0
 public GLFieldEventArgs(GLField <T> value)
 {
     this.Value = value;
 }