/////////////////////////////////////////////////////////////////////
 /// <summary>
 ///     Initializes a new instance of the StylusButtonEventArgs class.
 /// </summary>
 /// <param name="stylusDevice">
 ///     The logical Stylus device associated with this event.
 /// </param>
 /// <param name="timestamp">
 ///     The time when the input occured.
 /// </param>
 /// <param name="button">
 ///     The button.
 /// </param>
 public StylusButtonEventArgs(
     StylusDevice stylusDevice, int timestamp,
     StylusButton button)
     :
     base(stylusDevice, timestamp)
 {
     // ISSUE_XiaoTu: Do we need any validation here?
     _button = button;
 }
        /////////////////////////////////////////////////////////////////////
        /// <summary>
        ///     Initializes a new instance of the StylusButtonEventArgs class.
        /// </summary>
        /// <param name="stylusDevice">
        ///     The logical Stylus device associated with this event.
        /// </param>
        /// <param name="timestamp">
        ///     The time when the input occured.
        /// </param>
        /// <param name="button"> 
        ///     The button.
        /// </param>
        public StylusButtonEventArgs(
            StylusDevice stylusDevice, int timestamp,
            StylusButton button)
            :
            base(stylusDevice, timestamp)
        {

            // ISSUE_XiaoTu: Do we need any validation here?
            _button = button;
        }
Example #3
0
        private static StylusDeviceInfo[] GetStylusDevicesInfo(IPimcTablet pimcTablet)
        {
            int cCursors;

            pimcTablet.GetCursorCount(out cCursors); // Calls Unmanaged code - SecurityCritical with SUC.

            StylusDeviceInfo[] stylusDevicesInfo = new StylusDeviceInfo[cCursors];

            for ( int iCursor = 0; iCursor < cCursors; iCursor++ )
            {
                string sCursorName;
                int cursorId;
                bool fCursorInverted;
                pimcTablet.GetCursorInfo(iCursor, out sCursorName, out cursorId, out fCursorInverted); // Calls Unmanaged code - SecurityCritical with SUC.

                int cButtons;

                pimcTablet.GetCursorButtonCount(iCursor, out cButtons); // Calls Unmanaged code - SecurityCritical with SUC.
                StylusButton[] buttons = new StylusButton[cButtons];
                for ( int iButton = 0; iButton < cButtons; iButton++ )
                {
                    string sButtonName;
                    Guid buttonGuid;
                    pimcTablet.GetCursorButtonInfo(iCursor, iButton, out sButtonName, out buttonGuid); // Calls Unmanaged code - SecurityCritical with SUC.
                    buttons[iButton] = new StylusButton(sButtonName, buttonGuid);
                }
                StylusButtonCollection buttonCollection = new StylusButtonCollection(buttons);

                stylusDevicesInfo[iCursor].CursorName = sCursorName;
                stylusDevicesInfo[iCursor].CursorId = cursorId;
                stylusDevicesInfo[iCursor].CursorInverted = fCursorInverted;
                stylusDevicesInfo[iCursor].ButtonCollection = buttonCollection;
            }

            return stylusDevicesInfo;
        }
Example #4
0
 public StylusButtonEventArgs(StylusDevice stylusDevice, int timestamp, StylusButton button)
     : base(stylusDevice, timestamp)
 {
 }
 public StylusButtonEventArgs(StylusDevice stylusDevice, int timestamp, StylusButton button) : base(default(StylusDevice), default(int))
 {
 }
		public StylusButtonEventArgs (StylusDevice stylusDevice, int timestamp, StylusButton button)
			: base (stylusDevice, timestamp)
		{
		}
 public StylusButtonEventArgs(StylusDevice stylusDevice, int timestamp, StylusButton button) : base (default(StylusDevice), default(int))
 {
 }