Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        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;
            }
        }