示例#1
0
        public RawUIStateInputReport(
            PresentationSource inputSource,
            InputMode mode,
            int timestamp,
            RawUIStateActions action,
            RawUIStateTargets targets) : base(inputSource, InputType.Keyboard, mode, timestamp)
        {
            if (!IsValidRawUIStateAction(action))
                throw new System.ComponentModel.InvalidEnumArgumentException("action", (int)action, typeof(RawUIStateActions));
            if (!IsValidRawUIStateTargets(targets))
                throw new System.ComponentModel.InvalidEnumArgumentException("targets", (int)targets, typeof(RawUIStateTargets));

            _action = action;
            _targets = targets;
        }
示例#2
0
        public RawUIStateInputReport(
            PresentationSource inputSource,
            InputMode mode,
            int timestamp,
            RawUIStateActions action,
            RawUIStateTargets targets) : base(inputSource, InputType.Keyboard, mode, timestamp)
        {
            if (!IsValidRawUIStateAction(action))
            {
                throw new System.ComponentModel.InvalidEnumArgumentException("action", (int)action, typeof(RawUIStateActions));
            }
            if (!IsValidRawUIStateTargets(targets))
            {
                throw new System.ComponentModel.InvalidEnumArgumentException("targets", (int)targets, typeof(RawUIStateTargets));
            }

            _action  = action;
            _targets = targets;
        }
示例#3
0
 // IsValid Method for RawUIStateActions.
 internal static bool IsValidRawUIStateAction(RawUIStateActions action)
 {
     return(action == RawUIStateActions.Set ||
            action == RawUIStateActions.Clear ||
            action == RawUIStateActions.Initialize);
 }
示例#4
0
 // IsValid Method for RawUIStateActions.
 internal static bool IsValidRawUIStateAction(RawUIStateActions action)
 {
     return (action == RawUIStateActions.Set ||
             action == RawUIStateActions.Clear ||
             action == RawUIStateActions.Initialize);
 }