Exemple #1
0
        public CommandProvider(MacUI app, CommandProvider parent)
        {
            App = app;

            IsEnabled = new BooleanProperty("IsEnabled", true);
            CanStart  = new BooleanProperty("CanStart", true);
            CanStop   = new BooleanProperty("CanStop", false);

            notifyCanExecute = new NotifyStateChanged(IsEnabled, CanStart);
            if (parent != null)
            {
                notifyCanExecute.Register(parent.NotifyHasInstance);
            }

            stopCommand = new StopCommand(this);
        }
Exemple #2
0
 public StopCommand(CommandProvider provider)
     : base(provider, provider.CanStop)
 {
 }
Exemple #3
0
 protected Command(CommandProvider provider, INotifyStateChanged notify)
 {
     Provider           = provider;
     NotifyStateChanged = notify;
 }