public static void HighlightShapeByShapeTag(UI.ShapeTag Tag, Dataweb.NShape.WinFormsUI.Display Display) { Shape shape = Display.Diagram.Shapes.Where(s => s.Tag != null && s.Tag.GetType() == typeof(UI.ShapeTag) && ((UI.ShapeTag)s.Tag).Id == Tag.Id).SingleOrDefault(); if (shape != null) { shape.LineStyle = Display.Project.Design.LineStyles.Highlight; } }
public static void HighlightLink(UI.ShapeTag Tag, Dataweb.NShape.WinFormsUI.Display Display) { Shape shape = Display.Diagram.Shapes.Where(s => s.Type.Name == "Polyline" && s.Tag != null && s.Tag.GetType() == typeof(UI.ShapeTag) && ((UI.ShapeTag)s.Tag).Id == Tag.Id).SingleOrDefault(); if (shape != null) { shape.LineStyle = Display.Project.Design.LineStyles.Highlight; ((Polyline)shape).StartCapStyle = Display.Project.Design.CapStyles.OpenArrow; } }