示例#1
0
        /// <summary>
        /// Creates a predefined flow charting shape
        /// </summary>
        /// <param name="flowChartShape">flow charting shape</param>
        /// <param name="bounds">bounds</param>
        /// <param name="text">default label text</param>
        /// <param name="styleSheetName">name of the stylesheet from which to inherit styles</param>
        /// <returns>new basic shape</returns>
        protected NShape CreateFlowChartingShape(NDrawingDocument document, FlowChartingShapes flowChartShape, NRectangleF bounds, string text, string styleSheetName)
        {
            NFlowChartingShapesFactory factory = new NFlowChartingShapesFactory(document);
            NShape shape = factory.CreateShape((int)flowChartShape);

            shape.Bounds                   = bounds;
            shape.Text                     = text;
            shape.StyleSheetName           = styleSheetName;
            shape.Style.InteractivityStyle = CreateInteractivityStyle(text);

            document.ActiveLayer.AddChild(shape);
            return(shape);
        }