Ejemplo n.º 1
0
 public DebugListener(string parentIdent, string ident, ILifetimeObject owner, KeyCombinationList src, DebugListenerType debugtype)
 {
     ParentIdentifier = parentIdent;
     Identifier       = ident;
     keys             = src;
     Type             = debugtype;
     Owner            = owner;
 }
Ejemplo n.º 2
0
 public DebugListener(string parentIdent, string ident, ILifetimeObject owner, SKeys actionkey, KeyModifier mod, DebugListenerType debugtype)
 {
     ParentIdentifier = parentIdent;
     Identifier       = ident;
     keys             = new KeyCombinationList(new KeyCombination(actionkey, mod));
     Type             = debugtype;
     Owner            = owner;
 }
Ejemplo n.º 3
0
        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);
        }