public Finger Clone() { Finger f = new Finger(_identifier, _startposition); f.Position = _postition; f.Shift = _shift; return f; }
public FingerTouchEventArgs(Finger fingerinfo) { Finger = new Finger(fingerinfo.Identifier, fingerinfo.StartPosition) { Position = fingerinfo.Position }; }
public void FingerDown(object sender, FingerTouchEventArgs e) { if (_myfinger != null) return; _starttranslate = _transformhelper.Translate; _dragstart = e.Finger.Position; _draglimitreached = false; _startscale = _transformhelper.Scale; _myzindex = (int)this.GetValue(Canvas.ZIndexProperty); // _transformhelper.Delay = 0.25; // if (!DisableAnimation) { if (double.IsInfinity(_dragradius)) { _transformhelper.Scale = _startscale + .10; } else { _transformhelper.Scale = _startscale - .05; } } this.SetValue(Canvas.ZIndexProperty, 100); // _myfinger = new Finger(e.Finger.Identifier, e.Finger.Position); pz = this.TransformToVisual(this.Parent as UIElement).Transform(new Point()); _pressed = true; if (Pressed != null && _enabled) Pressed(this, new FingerTouchEventArgs( _myfinger.Clone() )); }
public void FingerUp(object sender, FingerTouchEventArgs e) { if (_myfinger != null && _myfinger.Identifier != e.Finger.Identifier) return; // if (double.IsInfinity(_dragradius)) if (!DisableAnimation) { _transformhelper.Delay = 0.50; _transformhelper.Scale = _startscale; } this.SetValue(Canvas.ZIndexProperty, _myzindex); // if (Tapped != null && _enabled && _myfinger != null && Utility.Vector2D.Distance(_myfinger.StartPosition, _myfinger.Position) < 10) { sfx.Play(); Tapped(this, new FingerTouchEventArgs(_myfinger.Clone())); } _pressed = false; if (Drop != null && _enabled) Drop(this, new FingerTouchEventArgs( _myfinger.Clone() )); _myfinger = null; // if (Drop == null || !_draglimitreached) { _transformhelper.Translate = _homelocation; } _transformhelper.Delay = 0.0; }
public GestureTranslateEventArgs(Finger finger, Point translationshift) { _finger = finger; _translationshift = translationshift; }
public GestureTapEventArgs(Finger finger, Point taplocation) { _finger = finger; _taplocation = taplocation; }
public GestureScaleEventArgs(Finger fingera, Finger fingerb, double scalefactor) { _fingera = fingera; _fingerb = fingerb; _scalefactor = scalefactor; }
private Finger _fingerb; // clone it before passing to args #endregion Fields #region Constructors public GestureRotateEventArgs(Finger fingera, Finger fingerb, double angleshift) { _angleshift = angleshift; _fingera = fingera; _fingerb = fingerb; }
public GestureHoldEventArgs(Finger finger, Point holdlocation) { _finger = finger; _holdlocation = holdlocation; }