本文整理汇总了C#中Point.ClientTo方法的典型用法代码示例。如果您正苦于以下问题:C# Point.ClientTo方法的具体用法?C# Point.ClientTo怎么用?C# Point.ClientTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Point
的用法示例。
在下文中一共展示了Point.ClientTo方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Tap
private void Tap(Point p)
{
this.Invoke(
new Action(() =>
{
if (this.pressedHandledBy != null && FleuxSettings.HapticFeedbackMode == FleuxSettings.HapticOptions.Tap)
{
FleuxApplication.Led.Vibrate();
}
var handled = false;
foreach (var el in this.elements.Where(e => e.Bounds.Contains(p)))
{
if (el.Tap(p.ClientTo(el.Location)))
{
handled = true;
break;
}
}
if (!handled && this.TapHandler != null)
{
handled = this.TapHandler(p);
}
}));
}
示例2: Hold
private void Hold(Point p)
{
var handled = false;
foreach (var el in this.elements.Where(e => e.Bounds.Contains(p)))
{
if (el.Hold(p.ClientTo(el.Location)))
{
handled = true;
break;
}
}
if (!handled && this.HoldHandler != null)
{
this.HoldHandler(p);
}
}
示例3: Pressed
public void Pressed(Point start)
{
this.pressedHandledBy = null;
foreach (var el in this.elements.Where(e => e.Bounds.Contains(start)))
{
this.pressedHandledBy = el.Pressed(start.ClientTo(el.Location));
if (this.pressedHandledBy != null)
{
break;
}
}
if (this.pressedHandledBy == null && this.PressedHandler != null)
{
this.pressedHandledBy = this.PressedHandler(start);
}
}
示例4: Pan
public void Pan(Point from, Point to, bool done)
{
var handled = false;
foreach (var el in this.elements.Where(e => e.Bounds.Contains(this.gestures.GestureStartPoint)))
{
if (el.Pan(from.ClientTo(el.Location), to.ClientTo(el.Location), done, this.gestures.GestureStartPoint.ClientTo(el.Location)))
{
handled = true;
break;
}
}
if (!handled && this.PanHandler != null)
{
this.PanHandler(from, to, done, this.gestures.GestureStartPoint);
}
}
示例5: Flick
public void Flick(Point from, Point to, int millisecs)
{
var handled = false;
foreach (var el in this.elements.Where(e => e.Bounds.Contains(this.gestures.GestureStartPoint)))
{
if (el.Flick(from.ClientTo(el.Location), to.ClientTo(el.Location), millisecs, this.gestures.GestureStartPoint.ClientTo(el.Location)))
{
handled = true;
break;
}
}
if (!handled && this.FlickHandler != null)
{
this.FlickHandler(from, to, millisecs, this.gestures.GestureStartPoint);
}
}
示例6: DoubleTap
private void DoubleTap(Point p)
{
var handled = false;
foreach (var el in this.elements.Where(e => e.Bounds.Contains(p)).ToArray())
{
if (el.DoubleTap(p.ClientTo(el.Location)))
{
handled = true;
break;
}
}
if (!handled && this.DoubleTapHandler != null)
{
this.DoubleTapHandler(p);
}
}