public ThemeEditorCommands() { this.ok = new Command(new Action<object> ( param => { if (this.OnOk != null) { this.OnOk(param); } } )); this.save = new Command(new Action<object> ( param => { if (this.OnSave != null) { this.OnSave(param); } } )); this.cancel = new Command(new Action<object> ( param => { if (this.OnCancel != null) { this.OnCancel(param); } } )); }
public ColorEditorCommands() { this.delete = new Command(new Action<object> ( param => { if (this.OnDelete != null) { this.OnDelete(param); } } ), new Predicate<object> ( param => { if (this.CanDelete != null) { return this.CanDelete(param); } return true; } )); this.up = new Command(new Action<object> ( param => { if (this.OnUp != null) { this.OnUp(param); } } ), new Predicate<object> ( param => { if (this.CanUp != null) { return this.CanUp(param); } return true; } )); this.down = new Command(new Action<object> ( param => { if (this.OnDown != null) { this.OnDown(param); } } ), new Predicate<object> ( param => { if (this.CanDown != null) { return this.CanDown(param); } return true; } )); }
public MainCommands() { this.editTheme = new Command(new Action<object> ( param => { if (this.OnEditTheme != null) { this.OnEditTheme(param); } } )); this.reset = new Command(new Action<object> ( param => { if (this.OnReset != null) { this.OnReset(param); } } )); this.save = new Command(new Action<object> ( param => { if (this.OnSave != null) { this.OnSave(param); } } )); this.start = new Command(new Action<object> ( param => { if (this.OnStart != null) { this.OnStart(param); } } ), new Predicate<object> ( param => { if (this.CanStart != null) { return this.CanStart(param); } return true; } )); this.stop = new Command(new Action<object> ( param => { if (this.OnStop != null) { this.OnStop(param); } } ), new Predicate<object> ( param => { if (this.CanStop != null) { return this.CanStop(param); } return true; } )); }