public override bool GetToolTip(Pane pane, PointF location, float pixelSize, out string tipText, out string titleText) { if (pane == Pane.Map) { PointF highlightLocation; Id <ControlPoint> existingControl = HitTestPoint(location, pixelSize, out highlightLocation); if (existingControl.IsNotNone) { TextPart[] textParts = SelectionDescriber.DescribeControl(symbolDB, eventDB, existingControl); base.ConvertTextPartsToToolTip(textParts, out tipText, out titleText); return(true); } else { tipText = titleText = ""; return(false); } } else { return(base.GetToolTip(pane, location, pixelSize, out tipText, out titleText)); } }
public override bool GetToolTip(Pane pane, PointF location, float pixelSize, out string tipText, out string titleText) { CourseLayout activeCourse; CourseView courseView = selectionMgr.ActiveCourseView; if (pane == Pane.Map) { activeCourse = controller.GetCourseLayout(); } else { activeCourse = controller.GetTopologyLayout(); } CourseObj touchedObject = null; for (CourseLayer layer = CourseLayer.MainCourse; layer <= CourseLayer.AllControls; ++layer) { if (touchedObject == null) { touchedObject = activeCourse.HitTest(location, pixelSize, layer, co => !(co is TopologyDropTargetCourseObj)); } } if (touchedObject != null) { TextPart[] textParts = SelectionDescriber.DescribeCourseObject(symbolDB, eventDB, touchedObject, courseView.ScaleRatio); if (textParts != null) { ConvertTextPartsToToolTip(textParts, out tipText, out titleText); return(true); } } tipText = titleText = ""; return(false); }