private void MpButton_RightButtonDown(object sender, RoutedEventArgs e) { MultipointMouseEventArgs multipointargs = e as MultipointMouseEventArgs; // If master mouse right-clicks, reset if (multipointargs.DeviceInfo.Id == DataStore.masterMouseID) { Reset(); } }
void MTContainer_MultiPointMouseUpEvent(object sender, RoutedEventArgs e) { //Send OSC message to remove cursor MultipointMouseEventArgs args = (MultipointMouseEventArgs)e; _cursors.Remove(args.DeviceInfo.DeviceId); SendStatusUpdate(); }
void MTContainer_MultiPointMouseMoveEvent(object sender, RoutedEventArgs e) { MultipointMouseEventArgs args = (MultipointMouseEventArgs)e; MultipointMouseDevice mouse = args.DeviceInfo.DeviceVisual; System.Windows.Point position = new System.Windows.Point(); if (mouse.LeftButton == MultipointMouseButtonState.Pressed) { if (mouse != null) { position = mouse.Position; } if (_cursors.Keys.Contains(args.DeviceInfo.DeviceId)) { Cursor c = _cursors[args.DeviceInfo.DeviceId]; c.Position = position; SendStatusUpdate(); } } }
void MTContainer_MultiPointMouseDownEvent(object sender, RoutedEventArgs e) { //Add Cursor Object and send cursor add an OSC message MultipointMouseEventArgs args = (MultipointMouseEventArgs)e; MultipointMouseDevice mouse = args.DeviceInfo.DeviceVisual as MultipointMouseDevice; System.Windows.Point position = new System.Windows.Point(); if (mouse != null) { position = mouse.Position; } Cursor _newCursor = new Cursor(position, 0, _cursorSessionCounter); if (!_cursors.Keys.Contains(args.DeviceInfo.DeviceId)) { _cursors.Add(args.DeviceInfo.DeviceId, _newCursor); _cursorSessionCounter++; } SendStatusUpdate(); }
private void MpButton_Click(object sender, RoutedEventArgs e) { MultipointMouseEventArgs multipointargs = e as MultipointMouseEventArgs; RecordClick(multipointargs.DeviceInfo.Id); }