protected virtual void OnChanged(InputIdentifier inputIdentifier, Point position, double orientation) { if (Changed != null) { InputArgs args = new InputArgs(inputIdentifier, position, orientation + Math.PI / 2.0); Changed(this, args); } }
private void manageTouches(ReadOnlyTouchPointCollection touches) { foreach (TouchPoint touch in touches) { if (touch.IsTagRecognized) { InputIdentifier inputIdentifier = new InputIdentifier(InputIdentifier.TYPE.tag, -1, (ulong)touch.Tag.Value); OnChanged(inputIdentifier, new Point(touch.CenterX, touch.CenterY), touch.Orientation); } } }
/// <summary> /// Creates a wrapper for the arguments of the event /// </summary> /// <param name="inputIdentifier"></param> /// <param name="position"></param> /// <param name="orientation"></param> public InputArgs(InputIdentifier inputIdentifier, Point position, double orientation) { InputIdentifier = inputIdentifier; Position = position; Orientation = orientation; }
public InputIdentifier getInputIdentifier() { InputIdentifier inputIdentifier = new InputIdentifier(this); return inputIdentifier; }
private void InputChanged(object sender, InputArgs args) { _currentInputIdentifier = args.InputIdentifier; changeButtonColor(button3, _currentInputIdentifier != null); }