예제 #1
0
        public TargetWhenSetter(
            Notifyable targetNotifyable,
            INotifyPropertyChanged sourceNotifyable,
            params string[] sourcePropertyNames)
        {
            this.targetNotifyable    = targetNotifyable;
            this.sourcePropertyNames = sourcePropertyNames;

            sourcePropertyNames.ForEach(
                propertyName => PropertyChangedEventManager.AddHandler(
                    sourceNotifyable, PropertyChangedEventHandler, propertyName));
        }
예제 #2
0
        protected TargetWhenSetter WhenSet(
            Notifyable sourceNotifyable, params string[] sourcePropertyName)
        {
            if (targetWhenSetters == null)
            {
                targetWhenSetters = new List <TargetWhenSetter>();
            }

            TargetWhenSetter whenSetter = new TargetWhenSetter(this, sourceNotifyable, sourcePropertyName);

            targetWhenSetters.Add(whenSetter);

            return(whenSetter);
        }
예제 #3
0
 public Property(string propertyName, Notifyable notifyable)
 {
     this.propertyName = propertyName;
     this.notifyable   = notifyable;
 }
예제 #4
0
 public void NotifyAll(Notifyable target)
 {
     targetNotifyable = target;
     isNotifyAll      = true;
 }
예제 #5
0
 public void Notify(Notifyable target, params string[] propertyNames)
 {
     targetNotifyable    = target;
     targetPropertyNames = propertyNames;
 }