Esempio n. 1
0
        void TheDefaultObjectDecorator(Microsoft.Msagl.Drawing.IViewerObject obj)
        {
            this.viewer.InvalidateBeforeTheChange(obj);
            IViewerNode node = obj as IViewerNode;

            if (node != null)
            {
                Node   drawingNode = node.Node;
                double w           = drawingNode.Attr.LineWidth;
                decoratorRemovalsDict[node] = (delegate() { drawingNode.Attr.LineWidth = (int)w; });
                drawingNode.Attr.LineWidth  = (int)Math.Max(viewer.LineThicknessForEditing, w * 2);
            }
            else
            {
                IViewerEdge edge = obj as IViewerEdge;
                if (edge != null)
                {
                    Edge   drawingEdge = edge.Edge;
                    double w           = drawingEdge.Attr.LineWidth;
                    decoratorRemovalsDict[edge] = (delegate() { drawingEdge.Attr.LineWidth = (int)w; });
                    drawingEdge.Attr.LineWidth  = (int)Math.Max(viewer.LineThicknessForEditing, w * 2);
                }
            }
            this.viewer.Invalidate(obj);
        }
Esempio n. 2
0
        void TheDefaultObjectDecoratorRemover(Microsoft.Msagl.Drawing.IViewerObject obj)
        {
            this.viewer.InvalidateBeforeTheChange(obj);
            DelegateReturningVoid v;

            if (decoratorRemovalsDict.TryGetValue(obj, out v))
            {
                decoratorRemovalsDict[obj](); //call the delegate
                decoratorRemovalsDict.Remove(obj);
                this.viewer.Invalidate(obj);
            }
        }
Esempio n. 3
0
 void RemoveNodeDragDecorations(Microsoft.Msagl.Drawing.IViewerObject obj)
 {
     (obj as SelectableShape).Highlighted = false;
 }
Esempio n. 4
0
 void DecorateNodeForDrag(Microsoft.Msagl.Drawing.IViewerObject obj)
 {
     //NodeShape nodeShape = node as NodeShape;
     //if (nodeShape != null)
     //    nodeShape.Fill = Common.BrushFromMsaglColor( .SelectedNodeAttribute.FillColor);
 }
Esempio n. 5
0
 void TheDefaultEdgeLabelDecoratorStub(Microsoft.Msagl.Drawing.IViewerObject label)
 {
 }