Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public void AddWatchedProperty(INotifyPropertyChanged owner, string propertyName)
        {
            if (PropertyWatcher == null)
            {
                PropertyWatcher = new PropertyChangedWatcher();
                PropertyWatcher.PropertyChangedCallback += this.WatchedPropertyChangedEventHandler;
            }

            PropertyWatcher.AddWatchedProperty(owner, propertyName);
        }
Exemplo n.º 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;
            }
        }
Exemplo n.º 4
0
 public ReactiveCommand(Action execute = null, CanExecuteDelegate canExecute = null, PropertyChangedWatcher propertyWatcher = null)
     : this(delegate(object param) { if (execute != null)
                                     {
                                         execute();
                                     }
            }, canExecute, propertyWatcher)
 {
 }