Exemplo n.º 1
0
        public bool Remove(string actionMap, ActionMapEventDelegate eventDelegate)
        {
            List<ActionMapEventDelegate> eventDelegates;
            if (actionmapDelegates.TryGetValue(actionMap, out eventDelegates))
                return eventDelegates.Remove(eventDelegate);

            return false;
        }
Exemplo n.º 2
0
        public bool Remove(string actionMap, ActionMapEventDelegate eventDelegate)
        {
            List <ActionMapEventDelegate> eventDelegates;

            if (actionmapDelegates.TryGetValue(actionMap, out eventDelegates))
            {
                return(eventDelegates.Remove(eventDelegate));
            }

            return(false);
        }
Exemplo n.º 3
0
        public void Add(string actionMap, ActionMapEventDelegate eventDelegate)
        {
            List<ActionMapEventDelegate> eventDelegates;
            if (!actionmapDelegates.TryGetValue(actionMap, out eventDelegates))
            {
                InputInterop.RegisterAction(actionMap);

                eventDelegates = new List<ActionMapEventDelegate>();
                actionmapDelegates.Add(actionMap, eventDelegates);
            }

            if (!eventDelegates.Contains(eventDelegate))
                eventDelegates.Add(eventDelegate);
        }
Exemplo n.º 4
0
        public void Add(string actionMap, ActionMapEventDelegate eventDelegate)
        {
            List <ActionMapEventDelegate> eventDelegates;

            if (!actionmapDelegates.TryGetValue(actionMap, out eventDelegates))
            {
                NativeInputMethods.RegisterAction(actionMap);

                eventDelegates = new List <ActionMapEventDelegate>();
                actionmapDelegates.Add(actionMap, eventDelegates);
            }

            if (!eventDelegates.Contains(eventDelegate))
            {
                eventDelegates.Add(eventDelegate);
            }
        }