当前位置: 首页>>代码示例>>C#>>正文


C# Point.ClientTo方法代码示例

本文整理汇总了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);
                 }
             }));
 }
开发者ID:flts,项目名称:fleux,代码行数:24,代码来源:FleuxControl.cs

示例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);
     }
 }
开发者ID:flts,项目名称:fleux,代码行数:16,代码来源:FleuxControl.cs

示例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);
            }
        }
开发者ID:flts,项目名称:fleux,代码行数:17,代码来源:FleuxControl.cs

示例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);
     }
 }
开发者ID:flts,项目名称:fleux,代码行数:16,代码来源:FleuxControl.cs

示例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);
     }
 }
开发者ID:flts,项目名称:fleux,代码行数:16,代码来源:FleuxControl.cs

示例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);
     }
 }
开发者ID:cail,项目名称:fleux,代码行数:16,代码来源:FleuxControl.cs


注:本文中的Point.ClientTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。