public ObservableShortcutConfig(string id, string d, AlephKey k, AlephModifierKeys m, AlephShortcutScope s) { _identifier = id; _description = d; _key = k; _modifiers = m; _scope = s; }
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 ShortcutDefinition(AlephShortcutScope s, AlephModifierKeys m, AlephKey k) { Scope = s; Modifiers = m; Key = k; }
public AlephAction(AlephShortcutScope s, Func <AlephAction, IShortcutHandlerParent, bool> e, string d, ActionModifier m) { DefaultScope = s; _run = e; Description = d; Modifier = m; }