コード例 #1
0
        private NMaster CreateGeneralizationMaster()
        {
            NStep3Connector c = new NStep3Connector(new NPointF(0, 0), new NPointF(100, 50), true);

            c.Name = "UML Generalization";

            NStrokeStyle    strokeStyle    = (NStrokeStyle)document.ComposeStrokeStyle().Clone();
            NArrowheadStyle arrowheadStyle = new NArrowheadStyle(ArrowheadShape.Arrow, string.Empty, ArrowSize, ConFillStyle, strokeStyle);

            NStyle.SetStartArrowheadStyle(c, arrowheadStyle);

            return(new NMaster(c, NGraphicsUnit.Pixel, c.Name, "Drag me on the drawing"));
        }
コード例 #2
0
        /// <summary>
        /// Shows the start arrowhead style editor for the specified styleable node
        /// </summary>
        /// <param name="styleable"></param>
        protected void ShowStartArrowheadStyleEditor(INStyleable styleable)
        {
            if (styleable == null)
            {
                return;
            }

            NArrowheadStyle arrowheadStyle    = styleable.ComposeStartArrowheadStyle();
            NArrowheadStyle newArrowheadStyle = null;

            if (NArrowheadStyleTypeEditor.Edit(arrowheadStyle, out newArrowheadStyle, true, arrowheadStyle != NStyle.GetStartArrowheadStyle(styleable)))
            {
                NStyle.SetStartArrowheadStyle(styleable, newArrowheadStyle);
                document.RefreshAllViews();
            }
        }
コード例 #3
0
        private NMaster CreateCompositionMaster()
        {
            NStep3Connector c = new NStep3Connector(new NPointF(0, 0), new NPointF(100, 50), true);

            c.Name = "UML Composition";

            NStrokeStyle    strokeStyle    = (NStrokeStyle)document.ComposeStrokeStyle().Clone();
            NArrowheadStyle arrowheadStyle = new NArrowheadStyle(ArrowheadShape.Losangle, string.Empty, LosangleSize, new NColorFillStyle(Color.Silver), (NStrokeStyle)strokeStyle.Clone());

            NStyle.SetStartArrowheadStyle(c, arrowheadStyle);

            arrowheadStyle = new NArrowheadStyle(ArrowheadShape.OpenedArrow, string.Empty, ArrowSize, ConFillStyle, (NStrokeStyle)strokeStyle.Clone());
            NStyle.SetEndArrowheadStyle(c, arrowheadStyle);

            return(new NMaster(c, NGraphicsUnit.Pixel, c.Name, "Drag me on the drawing"));
        }