public void GenerateBasicShapes()
        {
            Palette basicShapes = new Palette("Basic Shapes");

            basicShapes.Expanded = true;
            Node Rectangle = CreateNodes("Rectangle", "rectangle", null, null, "Process", 70, 45);

            basicShapes.AppendChild(Rectangle);

            Node Ellipse = CreateNodes("Ellipse", "ellipse", null, null, "Start/\nEnd", 70, 70);

            basicShapes.AppendChild(Ellipse);

            Collection points = new Collection();

            points.Add(new DiagramPoint(25, 1));
            points.Add(new DiagramPoint(99, 1));
            points.Add(new DiagramPoint(75, 99));
            points.Add(new DiagramPoint(1, 99));
            Node Parallelogram = CreateNodes("Parallelogram", "polygon", points, null, "Input/\nOutput", 70, 70);

            basicShapes.AppendChild(Parallelogram);

            points = new Collection();
            points.Add(new DiagramPoint(50, 1));
            points.Add(new DiagramPoint(100, 50));
            points.Add(new DiagramPoint(50, 100));
            points.Add(new DiagramPoint(1, 50));
            Node Dimond = CreateNodes("Dimond", "polygon", points, null, "Decision", 70, 70);

            basicShapes.AppendChild(Dimond);

            symbolpalette.Palettes.Add(basicShapes);
        }
Esempio n. 2
0
        public void GenerateNaiveShapes(SymbolPaletteProperties symbolpalette)
        {
            Palette swimlaneShapes = new Palette("Native Shapes");

            GenerateNativeShape(swimlaneShapes, "native", 40, 40, "svgTemplate7", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native1", 40, 40, "svgTemplate8", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native2", 40, 40, "svgTemplate6", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native3", 25, 40, "svgTemplate4", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native4", 40, 40, "svgTemplate3", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native5", 40, 40, "svgTemplate5", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native6", 40, 40, "svgTemplate1", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native7", 40, 40, "svgTemplate2", 100, 100);
            swimlaneShapes.AppendChild(CreateDiagramNode("arrow1", 100, 100, "white", "", 100, 100, true));
            symbolpalette.Palettes.Add(swimlaneShapes);
        }
Esempio n. 3
0
        public void GenerateNaiveShapes()
        {
            Palette swimlaneShapes = new Palette("Network Symbols");

            swimlaneShapes.Expanded = true;
            GenerateNativeShape(swimlaneShapes, "native", 40, 40, "svgTemplate7", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native1", 40, 40, "svgTemplate8", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native2", 40, 40, "svgTemplate6", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native3", 25, 40, "svgTemplate4", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native4", 40, 40, "svgTemplate3", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native5", 40, 40, "svgTemplate5", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native6", 40, 40, "svgTemplate1", 100, 100);
            GenerateNativeShape(swimlaneShapes, "native7", 40, 40, "svgTemplate2", 100, 100);
            swimlaneShapes.AppendChild(CreateDiagramNode("arrow", 75, 60, "white", "", 160, 135, true));
            symbolpalette.Palettes.Add(swimlaneShapes);
        }
Esempio n. 4
0
        public void createPaletteShapes(Palette activityShapes, string name, double width, double height, double offsetX, double offsetY, UMLActivityShapes shape)
        {
            UMLActivityShape ActivityShape = new UMLActivityShape()
            {
                Name    = name,
                Width   = width,
                Height  = height,
                OffsetX = offsetX,
                OffsetY = offsetY,
                Type    = Shapes.UMLActivity,
                Shape   = shape,
            };

            if (name == "StructuredNode")
            {
                Collection labels = new Collection();
                labels.Add(new Label()
                {
                    Text = "Structured Node"
                });
                ActivityShape.Labels = labels;
            }
            activityShapes.AppendChild(ActivityShape);
        }