Example #1
0
        public void AddWatchedCollection(INotifyPropertyChanged owner, string propertyName, INotifyCollectionChanged collection)
        {
            if (PropertyWatcher == null)
            {
                PropertyWatcher = new PropertyChangedWatcher();
                PropertyWatcher.PropertyChangedCallback += this.WatchedPropertyChangedEventHandler;
            }

            PropertyWatcher.AddWatchedCollection(owner, propertyName, collection);
        }
Example #2
0
        public void AddWatchedProperty(INotifyPropertyChanged owner, string propertyName)
        {
            if (PropertyWatcher == null)
            {
                PropertyWatcher = new PropertyChangedWatcher();
                PropertyWatcher.PropertyChangedCallback += this.WatchedPropertyChangedEventHandler;
            }

            PropertyWatcher.AddWatchedProperty(owner, propertyName);
        }
Example #3
0
        public ReactiveCommand(CommandExecuteDelegate execute = null, CanExecuteDelegate canExecute = null, PropertyChangedWatcher propertyWatcher = null)
        {
            ReasonsDisabled = new ObservableCollection <string>();

            CanExecuteMethod = canExecute;
            ExecuteMethod    = execute;
            PropertyWatcher  = propertyWatcher;

            if (PropertyWatcher != null)
            {
                PropertyWatcher.PropertyChangedCallback += this.WatchedPropertyChangedEventHandler;
            }
        }
Example #4
0
 public ReactiveCommand(Action execute = null, CanExecuteDelegate canExecute = null, PropertyChangedWatcher propertyWatcher = null)
     : this(delegate(object param) { if (execute != null)
                                     {
                                         execute();
                                     }
            }, canExecute, propertyWatcher)
 {
 }