コード例 #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;
 }