public virtual void OnAutomationDoubleClick(AnnPointerEventArgs e) { if (this.AutomationDoubleClick != null) { this.AutomationDoubleClick(this, e); } }
private static AnnPointerEventArgs ConvertPointerEventArgs(InteractiveEventArgs e, bool isDoubleTap) { // Convert the point var point = LeadPointD.Create(e.Position.X, e.Position.Y); // Convert the mouse button var mouseButton = AnnMouseButton.None; if (!isDoubleTap) { if (e.MouseButton == MouseButtons.Left) { mouseButton = AnnMouseButton.Left; } if (e.MouseButton == MouseButtons.Right) { mouseButton = AnnMouseButton.Right; } } else { mouseButton = AnnMouseButton.Left; } var args = AnnPointerEventArgs.Create(mouseButton, point); args.IsHandled = e.IsHandled; return(args); }
public virtual void OnAutomationPointerUp(AnnPointerEventArgs e) { if (this.AutomationPointerUp != null) { this.AutomationPointerUp(this, e); } }
public override bool OnPointerMove(AnnContainer sender, AnnPointerEventArgs e) { bool handled = false; if (TargetObject != null && HasStarted) { LeadPointD pt = ClipPoint(e.Location, ClipRectangle); if (!LeadPoint.Equals(pt, _end)) { _end = pt; LeadPointCollection points = TargetObject.Points; if (points.Count > 1) { if (_clickCount % 2 != 0) { points[points.Count - 1] = pt; // end point } } AnnIntersectionPointObject intersectionPointObject = TargetObject as AnnIntersectionPointObject; if (intersectionPointObject != null) { intersectionPointObject.IntersectionInsideContainer = ClipRectangle.ContainsPoint(intersectionPointObject.IntersectionPoint); } Working(); } handled = true; } return(handled); }
public override bool OnPointerUp(AnnContainer sender, AnnPointerEventArgs e) { bool handled = base.OnPointerUp(sender, e); _richTextEditor.ShowRichTextDialog(TargetObject as AnnRichTextObject); return(handled); }
public override bool OnPointerDoubleClick(AnnContainer sender, AnnPointerEventArgs e) { AnnRichTextObject obj = TargetObject as AnnRichTextObject; _richTextEditor.ShowRichTextDialog(obj); return(false); }
public override bool OnPointerUp(AnnContainer sender, AnnPointerEventArgs e) { LeadPointCollection points = TargetObject.Points; if (_clickCount > 3) { points.Add(_end); //we want to add point at the end to infrom us that drawing finished EndWorking(); } return(true); }
public override bool OnPointerUp(AnnContainer sender, AnnPointerEventArgs e) { AnnMidlineObject midlineObject = TargetObject as AnnMidlineObject; LeadPointCollection points = midlineObject.Points; if (ClickCount > 1) { EndWorking(); } return(true); }
// Fire the AutomationPointerMove event protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (!IsAutomationAttached || !AutomationEnabled) { return; } if (AutomationPointerMove != null) { // Convert the point to automation location LeadPointD location = LeadPointD.Create(e.Location.X, e.Location.Y); AutomationPointerMove(this, AnnPointerEventArgs.Create(AnnMouseButton.Left, location)); } }
public override bool OnPointerDown(AnnContainer sender, AnnPointerEventArgs e) { bool handled = base.OnPointerDown(sender, e); if (e.Button != AnnMouseButton.Left) { return(handled); } _clickCount++; if (e.Button == AnnMouseButton.Left) { LeadPointD _begin = ClipPoint(e.Location, ClipRectangle); _end = _begin; LeadPointCollection points = TargetObject.Points; if (_clickCount == 1) { points.Add(_begin); points.Add(_end); } else if (_clickCount % 2 != 0) { points.Add(_begin); points.Add(_end); } StartWorking(); handled = true; } return(handled); }