/// <summary> /// Draws dragged over glyph. /// </summary> /// <param name="stop">Bound stop.</param> /// <param name="context">DrawingContext.</param> private void _DrawDraggedOverGlyph(Stop stop, GanttItemElementDrawingContext context) { if (context.GlyphPanel == null) { return; } Rect elementRect = StopDrawer.GetElementRect(context); bool isStopFirst = false; if (stop.SequenceNumber == 1) { isStopFirst = true; } if (context.DrawDraggedOver && !context.DrawSelected && !_route.IsLocked) { context.GlyphPanel.AddGlyph(this, new StopDragOverGlyph(elementRect, isStopFirst)); } else { context.GlyphPanel.RemoveGlyphByKey(this); } }
/// <summary> /// Method draws element. /// </summary> /// <param name="context">Drawing context where element shoul be drawn.</param> public void Draw(GanttItemElementDrawingContext context) { Debug.Assert(_route != null); StopDrawer.StopInfo stopInfo = new StopDrawer.StopInfo(); stopInfo.Stop = _stop; stopInfo.Route = _route; StopDrawer.DrawStop(stopInfo, context); // Draw glyph over stop element. _DrawDraggedOverGlyph(_stop, context); }