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); }
public override void Execute(object parameter) { CommandWrapper.Execute(parameter, "DeprovisionServer"); }
public override void Execute(object parameter) { CommandWrapper.Execute(parameter, "ProvisionClient"); }
public override void Execute(object parameter) { CommandWrapper.Execute(parameter, "Synchronize"); }