public AlephAction(AlephShortcutScope s, Func <AlephAction, IShortcutHandlerParent, bool> e, string d, ActionModifier m) { DefaultScope = s; _run = e; Description = d; Modifier = m; }
private static void AddCommand(AlephShortcutScope scope, string k, Func <IShortcutHandler, ICommand> a, string desc, ActionModifier mod = ActionModifier.None) { bool Exec(AlephAction src, IShortcutHandlerParent w) { var vm = w.GetShortcutHandler(); if (vm == null) { return(false); } var c = a(vm); if (!c.CanExecute(null)) { return(false); } c.Execute(null); return(true); } _actions.Add(k, new AlephAction(scope, Exec, desc, mod)); }
public static T SetActionModifier <T>(this T entity, ActionModifier value) where T : RulesetActor { entity.SetField("actionModifier", value); return(entity); }
public AlephAction(Func <AlephAction, MainWindow, bool> e, string d, ActionModifier m) { _run = e; Description = d; Modifier = m; }
public static void AddCommand(string k, Func <MainWindowViewmodel, ICommand> a, string desc, ActionModifier mod = ActionModifier.None) { bool Exec(AlephAction src, MainWindow w) { var vm = w.VM; if (vm == null) { return(false); } var c = a(vm); if (!c.CanExecute(null)) { return(false); } c.Execute(null); return(true); } _actions.Add(k, new AlephAction(Exec, desc, mod)); }
public AttachModifierActionArgs(ISource source, THost target, ActionModifier <THost> modifier) : base(source, target) { Modifier = modifier; }