public IActionResult ComplexHierarchicalLayout()
        {
            ViewBag.Nodes                = ComplexHierarchicalDataDetails.GetAllRecords();
            ViewBag.getNodeDefaults      = "nodeDefaults";
            ViewBag.getConnectorDefaults = "connectorDefaults";
            DiagramMargin margin = new DiagramMargin()
            {
                Left = 10, Top = 50
            };

            ViewBag.marginValue = margin;
            return(View());
        }
Ejemplo n.º 2
0
        public IActionResult Serialization()
        {
            List <DiagramNodeAnnotation> Node1 = new List <DiagramNodeAnnotation>();

            Node1.Add(new DiagramNodeAnnotation()
            {
                Content = "Start"
            });
            List <DiagramNodeAnnotation> Node2 = new List <DiagramNodeAnnotation>();

            Node2.Add(new DiagramNodeAnnotation()
            {
                Content = "Alarm Rings"
            });
            List <DiagramNodeAnnotation> Node3 = new List <DiagramNodeAnnotation>();

            Node3.Add(new DiagramNodeAnnotation()
            {
                Content = "Ready to Get Up"
            });
            List <DiagramNodeAnnotation> Node4 = new List <DiagramNodeAnnotation>();

            Node4.Add(new DiagramNodeAnnotation()
            {
                Content = "Climb Out of Bed"
            });
            List <DiagramNodeAnnotation> Node5 = new List <DiagramNodeAnnotation>();

            Node5.Add(new DiagramNodeAnnotation()
            {
                Content = "End"
            });
            List <DiagramNodeAnnotation> Node6 = new List <DiagramNodeAnnotation>();

            Node6.Add(new DiagramNodeAnnotation()
            {
                Content = "Relay"
            });
            List <DiagramNodeAnnotation> Node7 = new List <DiagramNodeAnnotation>();

            Node7.Add(new DiagramNodeAnnotation()
            {
                Content = "Hit Snooze Button", Margin = new DiagramMargin()
                {
                    Left = 10, Right = 10, Bottom = 10, Top = 10
                }
            });
            List <DiagramNode> Nodes = new List <DiagramNode>();

            List <DiagramConnectorAnnotation> Connector1 = new List <DiagramConnectorAnnotation>();

            Connector1.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes", Style = new DiagramTextStyle()
                {
                    Fill = "White"
                }
            });

            List <DiagramConnectorAnnotation> Connector2 = new List <DiagramConnectorAnnotation>();

            Connector2.Add(new DiagramConnectorAnnotation()
            {
                Content = "No", Style = new DiagramTextStyle()
                {
                    Fill = "White"
                }
            });

            Nodes.Add(new DiagramNode()
            {
                Id      = "Start",
                OffsetX = 250,
                OffsetY = 60,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#d0f0f1", StrokeColor = "#797979"
                },
                Annotations = Node1,
                Shape       = new { type = "Flow", shape = "Terminator" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "Alarm",
                OffsetX = 250,
                OffsetY = 160,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = Node2,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "Ready",
                OffsetX = 250,
                OffsetY = 260,
                Width   = 100,
                Height  = 80,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#c5efaf", StrokeColor = "#797979"
                },
                Annotations = Node3,
                Shape       = new { type = "Flow", shape = "Decision" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "Climb",
                OffsetX = 250,
                OffsetY = 370,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = Node4,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "End",
                OffsetX = 250,
                OffsetY = 460,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#d0f0f1", StrokeColor = "#797979"
                },
                Annotations = Node5,
                Shape       = new { type = "Flow", shape = "Terminator" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "Relay",
                OffsetX = 450,
                OffsetY = 160,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#f8eee5", StrokeColor = "#797979"
                },
                Annotations = Node6,
                Shape       = new { type = "Flow", shape = "Delay" }
            });
            Nodes.Add(new DiagramNode()
            {
                Id      = "Hit",
                OffsetX = 450,
                OffsetY = 260,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = Node7,
                Shape       = new { type = "Flow", shape = "Process" }
            });

            List <DiagramConnector> Connectors = new List <DiagramConnector>();

            Connectors.Add(new DiagramConnector()
            {
                Id = "connector1", SourceID = "Start", TargetID = "Alarm",
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector2", SourceID = "Alarm", TargetID = "Ready"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector3", SourceID = "Ready", TargetID = "Climb", Annotations = Connector1
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector4", SourceID = "Climb", TargetID = "End"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector5", SourceID = "Ready", TargetID = "Hit", Annotations = Connector2
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector6", SourceID = "Hit", TargetID = "Relay"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector7", SourceID = "Relay", TargetID = "Alarm"
            });
            ViewBag.nodes      = Nodes;
            ViewBag.connectors = Connectors;


            List <DiagramNode> SymbolPaletee = new List <DiagramNode>();

            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Terminator", Shape = new { type = "Flow", shape = "Terminator" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Process", Shape = new { type = "Flow", shape = "Process" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Decision", Shape = new { type = "Flow", shape = "Decision" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Document", Shape = new { type = "Flow", shape = "Document" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "PreDefinedProcess", Shape = new { type = "Flow", shape = "PreDefinedProcess" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "PaperTap", Shape = new { type = "Flow", shape = "PaperTap" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "DirectData", Shape = new { type = "Flow", shape = "DirectData" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "SequentialData", Shape = new { type = "Flow", shape = "SequentialData" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Sort", Shape = new { type = "Flow", shape = "Sort" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "MultiDocument", Shape = new { type = "Flow", shape = "MultiDocument" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Collate", Shape = new { type = "Flow", shape = "Collate" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "SummingJunction", Shape = new { type = "Flow", shape = "SummingJunction" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Or", Shape = new { type = "Flow", shape = "Or" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "InternalStorage", Shape = new { type = "Flow", shape = "InternalStorage" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Extract", Shape = new { type = "Flow", shape = "Extract" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "ManualOperation", Shape = new { type = "Flow", shape = "ManualOperation" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Merge", Shape = new { type = "Flow", shape = "Merge" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "OffPageReference", Shape = new { type = "Flow", shape = "OffPageReference" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "SequentialAccessStorage", Shape = new { type = "Flow", shape = "SequentialAccessStorage" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Annotation", Shape = new { type = "Flow", shape = "Annotation" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Annotation2", Shape = new { type = "Flow", shape = "Annotation2" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Data", Shape = new { type = "Flow", shape = "Data" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Card", Shape = new { type = "Flow", shape = "Card" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Delay", Shape = new { type = "Flow", shape = "Delay" }
            });


            List <DiagramConnector> SymbolPaletteConnectors = new List <DiagramConnector>();

            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link1",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link2",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link3",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link4",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link5",
                Type        = Segments.Bezier,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });

            List <SymbolPalettePalette> Palette = new List <SymbolPalettePalette>();

            Palette.Add(new SymbolPalettePalette()
            {
                Id = "flow", Expanded = true, Symbols = SymbolPaletee, IconCss = "e-ddb-icons1 e-flow", Title = "Flow Shapes"
            });
            Palette.Add(new SymbolPalettePalette()
            {
                Id = "connectors", Expanded = true, Symbols = SymbolPaletteConnectors, IconCss = "e-ddb-icons1 e-connector", Title = "Connectors"
            });

            ViewBag.Palette = Palette;

            ViewBag.Spconnectors = SymbolPaletteConnectors;

            double[]         intervals = { 1, 9, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75 };
            DiagramGridlines grIdLines = new DiagramGridlines()
            {
                LineColor = "#e0e0e0", LineIntervals = intervals
            };

            ViewBag.gridLines = grIdLines;

            DiagramMargin margin = new DiagramMargin()
            {
                Left = 15, Right = 15, Bottom = 15, Top = 15
            };

            ViewBag.margin        = margin;
            ViewBag.getSymbolInfo = "getSymbolInfo";
            return(View());
        }
        public IActionResult SymbolPalette()
        {
            List <DiagramNode> SymbolPaletee = new List <DiagramNode>();

            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Terminator", Shape = new { type = "Flow", shape = "Terminator" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Terminator", Shape = new { type = "Flow", shape = "Terminator" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Process", Shape = new { type = "Flow", shape = "Process" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Decision", Shape = new { type = "Flow", shape = "Decision" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "Document", Shape = new { type = "Flow", shape = "Document" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "PreDefinedProcess", Shape = new { type = "Flow", shape = "PreDefinedProcess" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "PaperTap", Shape = new { type = "Flow", shape = "PaperTap" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "DirectData", Shape = new { type = "Flow", shape = "DirectData" }
            });
            SymbolPaletee.Add(new DiagramNode()
            {
                Id = "SequentialData", Shape = new { type = "Flow", shape = "SequentialData" }
            });


            List <DiagramNode> BasicNodes = new List <DiagramNode>();

            BasicNodes.Add(new DiagramNode()
            {
                Id = "Rectangle", Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Rectangle
                }
            });
            BasicNodes.Add(new DiagramNode()
            {
                Id = "Ellipse", Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Ellipse
                }
            });
            BasicNodes.Add(new DiagramNode()
            {
                Id = "Parallelogram", Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Parallelogram
                }
            });
            BasicNodes.Add(new DiagramNode()
            {
                Id = "Triangle", Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Triangle
                }
            });
            BasicNodes.Add(new DiagramNode()
            {
                Id = "Hexagon", Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Hexagon
                }
            });
            BasicNodes.Add(new DiagramNode()
            {
                Id = "Pentagon", Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Pentagon
                }
            });
            BasicNodes.Add(new DiagramNode()
            {
                Id = "Cylinder", Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Cylinder
                }
            });
            BasicNodes.Add(new DiagramNode()
            {
                Id = "Star", Shape = new DiagramBasicShape()
                {
                    Type = Syncfusion.EJ2.Diagrams.Shapes.Basic, Shape = BasicShapes.Star
                }
            });
            ViewBag.BasicShapes = BasicNodes;

            List <DiagramConnector> connector = new List <DiagramConnector>();

            connector.Add(new DiagramConnector()
            {
                Id = "link1", Type = Segments.Orthogonal, SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                }, TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                }, TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow, Style = new DiagramShapeStyle()
                    {
                        StrokeColor = "#757575", Fill = "#757575"
                    }
                }, Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            connector.Add(new DiagramConnector()
            {
                Id = "link3", Type = Segments.Orthogonal, SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                }, TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                }, TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                }, Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            connector.Add(new DiagramConnector()
            {
                Id = "Link21", Type = Segments.Straight, SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                }, TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                }, TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow, Style = new DiagramShapeStyle()
                    {
                        StrokeColor = "#757575", Fill = "#757575"
                    }
                }, Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            connector.Add(new DiagramConnector()
            {
                Id = "link23", Type = Segments.Straight, SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                }, TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                }, TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                }, Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            connector.Add(new DiagramConnector()
            {
                Id = "link33", Type = Segments.Bezier, SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                }, TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                }, TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                }, Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            ViewBag.Connectors = connector;

            List <SymbolPalettePalette> palettes = new List <SymbolPalettePalette>();

            palettes.Add(new SymbolPalettePalette()
            {
                Id = "flow", Expanded = true, Symbols = SymbolPaletee, IconCss = "e-ddb-icons e-basic", Title = "Flow Shapes"
            });
            palettes.Add(new SymbolPalettePalette()
            {
                Id = "basic", Expanded = true, Symbols = BasicNodes, IconCss = "e-ddb-icons e-flow", Title = "Basic Shapes"
            });
            palettes.Add(new SymbolPalettePalette()
            {
                Id = "connectors", Expanded = true, Symbols = connector, IconCss = "e-ddb-icons e-connector", Title = "Connectors"
            });
            ViewBag.palettes = palettes;

            List <ExpandOptions> expand = new List <ExpandOptions>();

            expand.Add(new ExpandOptions()
            {
                text = "Single", value = "single"
            });
            expand.Add(new ExpandOptions()
            {
                text = "Multiple", value = "multiple"
            });

            ViewBag.expand = expand;

            DiagramMargin margin = new DiagramMargin()
            {
                Left = 15, Bottom = 15, Right = 15, Top = 15
            };

            ViewBag.margin = margin;

            ViewBag.getNodeDefaults = "getNodeDefaults";
            ViewBag.getSymbolInfo   = "getSymbolInfo";
            ViewBag.valueChanged    = "valueChanged";
            ViewBag.expandValue     = "Multiple";
            return(View());
        }
        public DiagramConnector AddConnector(string Id, string SourceID, string SourcePortID, string TargetID, Segments type, List <DiagramConnectorAnnotation> annotation, DiagramMargin margin, DiagramStrokeStyle style)
        {
            DiagramConnector connector = new DiagramConnector();

            connector.Id       = Id;
            connector.SourceID = SourceID;
            if (SourcePortID != "")
            {
                connector.SourcePortID = SourcePortID;
            }
            connector.TargetID    = TargetID;
            connector.Type        = type;
            connector.Annotations = annotation;
            connector.Style       = style;
            connector.Margin      = margin;
            return(connector);
        }
        public DiagramNode AddBpmnEvent(string Id, double width, double height, double offSetX, double offsetY, BpmnEvents events, DiagramMargin margin, List <DiagramNodeAnnotation> annotation, BpmnTriggers trigger = BpmnTriggers.None)
        {
            DiagramNode node = new DiagramNode();

            node.Id          = Id;
            node.Width       = width;
            node.Height      = height;
            node.OffsetX     = offSetX;
            node.OffsetY     = offsetY;
            node.Margin      = margin;
            node.Annotations = annotation;
            node.Shape       = new BpmnShapes()
            {
                Type  = "Bpmn",
                Shape = "Event",
                Event = new DiagramBpmnEvent()
                {
                    Event = events, Trigger = trigger
                },
            };
            return(node);
        }
        // GET: Serialization
        public ActionResult Serialization()
        {
            List <DiagramNode> nodes = new List <DiagramNode>();

            nodes.Add(new DiagramNode()
            {
                Id      = "Start",
                OffsetX = 150,
                OffsetY = 80,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#d0f0f1", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Start"
                    }
                },
                Shape = new { type = "Flow", shape = "Terminator" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "Alarm",
                OffsetX = 150,
                OffsetY = 160,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Alarm Rings"
                    }
                },
                Shape = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "Ready",
                OffsetX = 150,
                OffsetY = 240,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#c5efaf", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Ready to Get Up"
                    }
                },
                Shape = new { type = "Flow", shape = "Decision" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "Climb",
                OffsetX = 150,
                OffsetY = 330,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Climb Out of Bed"
                    }
                },
                Shape = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "End",
                OffsetX = 150,
                OffsetY = 430,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#d0f0f1", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "End"
                    }
                },
                Shape = new { type = "Flow", shape = "Terminator" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "Relay",
                OffsetX = 350,
                OffsetY = 160,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#f8eee5", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Relay"
                    }
                },
                Shape = new { type = "Flow", shape = "Delay" }
            });
            nodes.Add(new DiagramNode()
            {
                Id      = "Hit",
                OffsetX = 350,
                OffsetY = 240,
                Width   = 100,
                Height  = 50,
                Style   = new DiagramShapeStyle()
                {
                    Fill = "#fbfdc5", StrokeColor = "#797979"
                },
                Annotations = new List <DiagramNodeAnnotation>()
                {
                    new DiagramNodeAnnotation()
                    {
                        Content = "Hit Snooze Button", Margin = new DiagramMargin()
                        {
                            Left = 10, Right = 10, Bottom = 10, Top = 10
                        }
                    }
                },
                Shape = new { type = "Flow", shape = "Process" }
            });

            List <DiagramConnector> connectors = new List <DiagramConnector>();

            connectors.Add(new DiagramConnector()
            {
                Id = "connector1", SourceID = "Start", TargetID = "Alarm"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector2", SourceID = "Alarm", TargetID = "Ready"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector3", SourceID = "Ready", TargetID = "Climb"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector4", SourceID = "Climb", TargetID = "End"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector5", SourceID = "Ready", TargetID = "Hit"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector6", SourceID = "Hit", TargetID = "Relay"
            });
            connectors.Add(new DiagramConnector()
            {
                Id = "connector7", SourceID = "Relay", TargetID = "Alarm"
            });

            ViewBag.nodes      = nodes;
            ViewBag.connectors = connectors;

            List <DiagramNode> flowShapes = new List <DiagramNode>();

            flowShapes.Add(new DiagramNode()
            {
                Id = "Terminator", Shape = new { type = "Flow", shape = "Terminator" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Process", Shape = new { type = "Flow", shape = "Process" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Decision", Shape = new { type = "Flow", shape = "Decision" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Document", Shape = new { type = "Flow", shape = "Document" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "PreDefinedProcess", Shape = new { type = "Flow", shape = "PreDefinedProcess" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "PaperTap", Shape = new { type = "Flow", shape = "PaperTap" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "DirectData", Shape = new { type = "Flow", shape = "DirectData" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SequentialData", Shape = new { type = "Flow", shape = "SequentialData" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Sort", Shape = new { type = "Flow", shape = "Sort" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "MultiDocument", Shape = new { type = "Flow", shape = "MultiDocument" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Collate", Shape = new { type = "Flow", shape = "Collate" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SummingJunction", Shape = new { type = "Flow", shape = "SummingJunction" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Or", Shape = new { type = "Flow", shape = "Or" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "InternalStorage", Shape = new { type = "Flow", shape = "InternalStorage" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Extract", Shape = new { type = "Flow", shape = "Extract" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "ManualOperation", Shape = new { type = "Flow", shape = "ManualOperation" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Merge", Shape = new { type = "Flow", shape = "Merge" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "OffPageReference", Shape = new { type = "Flow", shape = "OffPageReference" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SequentialAccessStorage", Shape = new { type = "Flow", shape = "SequentialAccessStorage" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Annotation", Shape = new { type = "Flow", shape = "Annotation" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Annotation2", Shape = new { type = "Flow", shape = "Annotation2" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Data", Shape = new { type = "Flow", shape = "Data" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Card", Shape = new { type = "Flow", shape = "Card" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Delay", Shape = new { type = "Flow", shape = "Delay" }
            });


            List <DiagramConnector> paletteConnectors = new List <DiagramConnector>();

            paletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link1",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow, Style = new DiagramShapeStyle()
                    {
                        StrokeColor = "#757575", Fill = "#757575"
                    }
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            paletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link2",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            paletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link3",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow, Style = new DiagramShapeStyle()
                    {
                        StrokeColor = "#757575", Fill = "#757575"
                    }
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            paletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link4",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });
            paletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link5",
                Type        = Segments.Bezier,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2, StrokeColor = "#757575"
                }
            });

            List <SymbolPalettePalette> palettes = new List <SymbolPalettePalette>();

            palettes.Add(new SymbolPalettePalette()
            {
                Id = "flow", Expanded = true, Symbols = flowShapes, IconCss = "shapes", Title = "Flow Shapes"
            });
            palettes.Add(new SymbolPalettePalette()
            {
                Id = "connectors", Expanded = true, Symbols = paletteConnectors, IconCss = "shapes", Title = "Connectors"
            });

            ViewBag.Palette = palettes;

            ViewBag.Spconnectors = paletteConnectors;

            double[]         intervals = { 1, 9, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75 };
            DiagramGridlines grIdLines = new DiagramGridlines()
            {
                LineColor = "#e0e0e0", LineIntervals = intervals
            };

            ViewBag.gridLines = grIdLines;

            DiagramMargin margin = new DiagramMargin()
            {
                Left = 15, Right = 15, Bottom = 15, Top = 15
            };

            ViewBag.margin = margin;

            return(View());
        }
        // GET= DefaultFunctionalities
        public ActionResult DefaultFunctionalities()
        {
            List <DiagramNode>           nodes = new List <DiagramNode>();
            List <DiagramNodeAnnotation> Node1 = new List <DiagramNodeAnnotation>();

            Node1.Add(new DiagramNodeAnnotation()
            {
                Content = "Place Order", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node2 = new List <DiagramNodeAnnotation>();

            Node2.Add(new DiagramNodeAnnotation()
            {
                Content = "Start Transaction", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node3 = new List <DiagramNodeAnnotation>();

            Node3.Add(new DiagramNodeAnnotation()
            {
                Content = "Verification", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node4 = new List <DiagramNodeAnnotation>();

            Node4.Add(new DiagramNodeAnnotation()
            {
                Content = "Credit Card ValId?", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node5 = new List <DiagramNodeAnnotation>();

            Node5.Add(new DiagramNodeAnnotation()
            {
                Content = "Funds Available", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node6 = new List <DiagramNodeAnnotation>();

            Node6.Add(new DiagramNodeAnnotation()
            {
                Content = "Enter Payment Method", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node7 = new List <DiagramNodeAnnotation>();

            Node7.Add(new DiagramNodeAnnotation()
            {
                Content = "Log Transaction", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node8 = new List <DiagramNodeAnnotation>();

            Node8.Add(new DiagramNodeAnnotation()
            {
                Content = "Reconcile the entries", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node9 = new List <DiagramNodeAnnotation>();

            Node9.Add(new DiagramNodeAnnotation()
            {
                Content = "Complete Transaction", Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node10 = new List <DiagramNodeAnnotation>();

            Node10.Add(new DiagramNodeAnnotation()
            {
                Content = "Send E-mail", Margin = new DiagramMargin()
                {
                    Left = 25, Right = 25
                }, Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramNodeAnnotation> Node11 = new List <DiagramNodeAnnotation>();

            Node11.Add(new DiagramNodeAnnotation()
            {
                Content = "Customer Database", Margin = new DiagramMargin()
                {
                    Left = 25, Right = 25
                }, Style = new DiagramTextStyle()
                {
                    Color = "white", Fill = "transparent"
                }
            });

            List <DiagramConnectorAnnotation> Connector1 = new List <DiagramConnectorAnnotation>();

            Connector1.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes", Style = new DiagramTextStyle()
                {
                    Fill = "White"
                }
            });

            List <DiagramConnectorAnnotation> Connector2 = new List <DiagramConnectorAnnotation>();

            Connector2.Add(new DiagramConnectorAnnotation()
            {
                Content = "Yes", Style = new DiagramTextStyle()
                {
                    Fill = "White"
                }
            });

            List <DiagramConnectorAnnotation> Connector3 = new List <DiagramConnectorAnnotation>();

            Connector3.Add(new DiagramConnectorAnnotation()
            {
                Content = "No", Style = new DiagramTextStyle()
                {
                    Fill = "White"
                }
            });

            nodes.Add(new DiagramNode()
            {
                Id          = "NewIdea",
                OffsetY     = 80,
                OffsetX     = 340,
                Height      = 60,
                Annotations = Node1,
                Shape       = new { type = "Flow", shape = "Terminator" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "Meeting",
                OffsetX     = 340,
                OffsetY     = 160,
                Height      = 60,
                Annotations = Node2,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "BoardDecision",
                OffsetX     = 340,
                OffsetY     = 240,
                Height      = 60,
                Annotations = Node3,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "Project",
                OffsetX     = 340,
                OffsetY     = 330,
                Height      = 60,
                Annotations = Node4,
                Shape       = new { type = "Flow", shape = "Decision" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "End",
                OffsetY     = 430,
                OffsetX     = 340,
                Height      = 60,
                Annotations = Node5,
                Shape       = new { type = "Flow", shape = "Decision" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "node11",
                OffsetY     = 330,
                OffsetX     = 550,
                Height      = 60,
                Annotations = Node6,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "transaction_entered",
                OffsetY     = 630,
                OffsetX     = 340,
                Height      = 60,
                Annotations = Node7,
                Shape       = new { type = "Flow", shape = "Terminator" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "node12",
                OffsetY     = 630,
                OffsetX     = 550,
                Height      = 60,
                Annotations = Node8,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "transaction_completed",
                OffsetY     = 530,
                OffsetX     = 340,
                Height      = 60,
                Annotations = Node9,
                Shape       = new { type = "Flow", shape = "Process" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "Data",
                OffsetY     = 530,
                OffsetX     = 120,
                Height      = 60,
                Annotations = Node10,
                Shape       = new { type = "Flow", shape = "Data" }
            });
            nodes.Add(new DiagramNode()
            {
                Id          = "node10",
                OffsetY     = 530,
                OffsetX     = 550,
                Height      = 60,
                Annotations = Node11,
                Shape       = new { type = "Flow", shape = "DirectData" }
            });

            List <DiagramConnector> Connectors = new List <DiagramConnector>();

            Connectors.Add(new DiagramConnector()
            {
                Id = "connector1", SourceID = "NewIdea", TargetID = "Meeting",
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector2", SourceID = "Meeting", TargetID = "BoardDecision"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector3", SourceID = "BoardDecision", TargetID = "Project"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id          = "connector4",
                SourceID    = "Project",
                TargetID    = "End",
                Annotations = Connector1
            });
            Connectors.Add(new DiagramConnector()
            {
                Id          = "connector5",
                SourceID    = "End",
                TargetID    = "transaction_completed",
                Annotations = Connector2
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector6", SourceID = "transaction_completed", TargetID = "transaction_entered"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector7", SourceID = "transaction_completed", TargetID = "Data"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector8", SourceID = "transaction_completed", TargetID = "node10"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector9", SourceID = "node11", TargetID = "Meeting"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id = "connector10", SourceID = "End", TargetID = "node11"
            });
            Connectors.Add(new DiagramConnector()
            {
                Id          = "connector11",
                SourceID    = "Project",
                TargetID    = "node11",
                Annotations = Connector3
            });
            Connectors.Add(new DiagramConnector()
            {
                Id       = "connector12",
                SourceID = "transaction_entered",
                TargetID = "node12",
                Style    = new DiagramStrokeStyle()
                {
                    StrokeDashArray = "2,2"
                }
            });
            ViewBag.nodes      = nodes;
            ViewBag.connectors = Connectors;

            List <Syncfusion.EJ2.Diagrams.DiagramNode> flowShapes = new List <Syncfusion.EJ2.Diagrams.DiagramNode>();

            flowShapes.Add(new DiagramNode()
            {
                Id = "Terminator", Shape = new { type = "Flow", shape = "Terminator" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Process", Shape = new { type = "Flow", shape = "Process" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Decision", Shape = new { type = "Flow", shape = "Decision" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Document", Shape = new { type = "Flow", shape = "Document" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "PreDefinedProcess", Shape = new { type = "Flow", shape = "PreDefinedProcess" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "PaperTap", Shape = new { type = "Flow", shape = "PaperTap" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "DirectData", Shape = new { type = "Flow", shape = "DirectData" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SequentialData", Shape = new { type = "Flow", shape = "SequentialData" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Sort", Shape = new { type = "Flow", shape = "Sort" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "MultiDocument", Shape = new { type = "Flow", shape = "MultiDocument" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Collate", Shape = new { type = "Flow", shape = "Collate" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SummingJunction", Shape = new { type = "Flow", shape = "SummingJunction" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Or", Shape = new { type = "Flow", shape = "Or" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "InternalStorage", Shape = new { type = "Flow", shape = "InternalStorage" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Extract", Shape = new { type = "Flow", shape = "Extract" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "ManualOperation", Shape = new { type = "Flow", shape = "ManualOperation" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Merge", Shape = new { type = "Flow", shape = "Merge" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "OffPageReference", Shape = new { type = "Flow", shape = "OffPageReference" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "SequentialAccessStorage", Shape = new { type = "Flow", shape = "SequentialAccessStorage" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Annotation", Shape = new { type = "Flow", shape = "Annotation" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Annotation2", Shape = new { type = "Flow", shape = "Annotation2" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Data", Shape = new { type = "Flow", shape = "Data" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Card", Shape = new { type = "Flow", shape = "Card" }
            });
            flowShapes.Add(new DiagramNode()
            {
                Id = "Delay", Shape = new { type = "Flow", shape = "Delay" }
            });


            List <DiagramConnector> SymbolPaletteConnectors = new List <DiagramConnector>();

            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link1",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link2",
                Type        = Segments.Orthogonal,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link3",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.Arrow
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link4",
                Type        = Segments.Straight,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });
            SymbolPaletteConnectors.Add(new DiagramConnector()
            {
                Id          = "Link5",
                Type        = Segments.Bezier,
                SourcePoint = new DiagramPoint()
                {
                    X = 0, Y = 0
                },
                TargetPoint = new DiagramPoint()
                {
                    X = 40, Y = 40
                },
                TargetDecorator = new ConnectorTargetDecoratorConnectors()
                {
                    Shape = DecoratorShapes.None
                },
                Style = new DiagramStrokeStyle()
                {
                    StrokeWidth = 2
                }
            });

            List <SymbolPalettePalette> Palette = new List <SymbolPalettePalette>();

            Palette.Add(new SymbolPalettePalette()
            {
                Id = "flow", Expanded = true, Symbols = flowShapes, IconCss = "shapes", Title = "Flow Shapes"
            });
            Palette.Add(new SymbolPalettePalette()
            {
                Id = "connectors", Expanded = true, Symbols = SymbolPaletteConnectors, IconCss = "shapes", Title = "Connectors"
            });

            ViewBag.Palette = Palette;

            double[]         intervals = { 1, 9, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75, 0.25, 9.75 };
            DiagramGridlines grIdLines = new DiagramGridlines()
            {
                LineColor = "#e0e0e0", LineIntervals = intervals
            };

            ViewBag.gridLines = grIdLines;

            DiagramMargin margin = new DiagramMargin()
            {
                Left = 15, Right = 15, Bottom = 15, Top = 15
            };

            ViewBag.margin = margin;

            return(View());
        }