Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public StopCommand(CommandProvider provider)
     : base(provider, provider.CanStop)
 {
 }
Ejemplo n.º 3
0
 protected Command(CommandProvider provider, INotifyStateChanged notify)
 {
     Provider           = provider;
     NotifyStateChanged = notify;
 }