本文整理汇总了C#中eDriven.Core.Events.Event.Cancel方法的典型用法代码示例。如果您正苦于以下问题:C# Event.Cancel方法的具体用法?C# Event.Cancel怎么用?C# Event.Cancel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eDriven.Core.Events.Event
的用法示例。
在下文中一共展示了Event.Cancel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ComponentMouseOutHandler
private void ComponentMouseOutHandler(Event e)
{
Debug.Log(string.Format("ComponentMouseOutHandler [{0}, {1}]", e.Phase, e.CurrentTarget));
if (DragManager.IsDragging)
return;
e.Cancel();
DragManager.IsDragging = false;
DoRenderOverlay = false;
}
示例2: IdleMouseOutHandler
/// <summary>
/// Fires on mouse out when idle
/// </summary>
/// <param name="e"></param>
private void IdleMouseOutHandler(Event e)
{
MouseEvent me = (MouseEvent) e;
if (_component.Bounds.Contains(_component.GlobalToLocal(me.GlobalPosition)))
return; // still inside
#if DEBUG
if (DebugMode)
{
Debug.Log("IdleMouseOutHandler");
}
#endif
if (DragManager.IsDragging)
return;
e.Cancel();
DoRenderOverlay = false;
HideCursor();
StopScanning();
_previousResizeMode = null;
}
示例3: ComponentMouseMoveHandler
/// <summary>
/// We should listen the mouse move events over the component
/// If mouse moved over the event, we should check border and draw overlay
/// </summary>
/// <param name="e"></param>
private void ComponentMouseMoveHandler(Event e)
{
if (!Enabled)
return;
Debug.Log(string.Format("ComponentMouseMoveHandler [{0}, {1}]", e.Phase, e.CurrentTarget));
if (!(e.Target is DisplayListMember))
return;
DisplayListMember dlm = (DisplayListMember)e.Target;
MouseEvent me = (MouseEvent)e;
//Container container = _component as Container;
//Point coordsInComponentSpace = null != container ?
// container.GlobalToContent(dlm.LocalToGlobal(me.LocalPosition)) :
// _component.GlobalToLocal(dlm.LocalToGlobal(me.LocalPosition));
Point coordsInComponentSpace = _component.GlobalToLocal(dlm.LocalToGlobal(me.LocalPosition));
// if some component is already being dragged/resized, do not draw borders on hover
if (DragManager.IsDragging)
return;
if (_constraintMode)
{
_constrainedRect = _constraintMetrics.GetConstrainedRectangle(_component.Transform.LocalBounds);
DoRenderOverlay = _constrainedRect.Contains(coordsInComponentSpace);
}
else
{
DoRenderOverlay = true;
}
if (DoRenderOverlay)
{
e.Cancel();
}
}