public static void AddPush(string ident, ILifetimeObject owner, Keys actionkey, KeyboardModifiers mod, Action<DebugListener> listenerEvent = null) { var upperIdent = ident.ToUpper(); if (listeners.ContainsKey(upperIdent)) listeners.Remove(upperIdent); var result = new DebugListener(ident, owner, actionkey, mod, DebugListener.DebugListenerType.Push); if (listenerEvent != null) result.SetEvent(listenerEvent); listeners.Add(upperIdent, result); }
public static void AddSwitch(string ident, ILifetimeObject owner, Keys actionkey, KeyboardModifiers mod, bool initial) { var upperIdent = ident.ToUpper(); if (listeners.ContainsKey(upperIdent)) listeners.Remove(upperIdent); var result = new DebugListener(ident, owner, actionkey, mod, DebugListener.DebugListenerType.Switch); result.Set(initial); listeners.Add(upperIdent, result); }
public static void AddFunctionless(string parentIdent, string ident, ILifetimeObject owner) { var upperIdent = ident.ToUpper(); if (listeners.ContainsKey(upperIdent)) { listeners.Remove(upperIdent); } var result = new DebugListener(parentIdent, ident, owner, KCL.C(SKeys.X), DebugListener.DebugListenerType.Functionless); result.Set(true); listeners.Add(upperIdent, result); }
public static void AddSwitch(string parentIdent, string ident, ILifetimeObject owner, KeyCombinationList sources, bool initial) { var upperIdent = ident.ToUpper(); if (listeners.ContainsKey(upperIdent)) { initial = listeners[upperIdent].SelfActive; listeners.Remove(upperIdent); } var result = new DebugListener(parentIdent, ident, owner, sources, DebugListener.DebugListenerType.Switch); result.Set(initial); listeners.Add(upperIdent, result); }
public static void AddPush(string parentIdent, string ident, ILifetimeObject owner, SKeys actionkey, KeyModifier mod, Action <DebugListener> listenerEvent = null) { var upperIdent = ident.ToUpper(); if (listeners.ContainsKey(upperIdent)) { listeners.Remove(upperIdent); } var result = new DebugListener(parentIdent, ident, owner, actionkey, mod, DebugListener.DebugListenerType.Push); if (listenerEvent != null) { result.SetEvent(listenerEvent); } listeners.Add(upperIdent, result); }