Example #1
0
        public static void BindCommand(this Button button, IFormsCommand command, Func <object, object> param)
        {
            var wrapper = new CommandWrapper(command);

            // button.DataBindings.Add("Text", wrapper, "DisplayName");
            button.DataBindings.Add("Enabled", wrapper, "CanExecute");
            button.Click += (s, e) => wrapper.Execute(param);
        }
Example #2
0
 public override void Execute(object parameter)
 {
     CommandWrapper.Execute(parameter, "DeprovisionServer");
 }
 public override void Execute(object parameter)
 {
     CommandWrapper.Execute(parameter, "ProvisionClient");
 }
Example #4
0
 public override void Execute(object parameter)
 {
     CommandWrapper.Execute(parameter, "Synchronize");
 }