Exemplo n.º 1
0
        public override void LoadNavigationTree()
        {
            TreeView tree = NavigationTreeControl.NavigationTree;

            tree.Nodes.Clear();

            NExampleFolderEntity rootFolder = NExamplesHelper.LoadExamplesTree(Config.EmbeddedResourcesAssembly, Config.TreeResource, Config.TreeResourcePath);

            tree.Nodes.Add(LoadTreeFolder(string.Empty, rootFolder));
        }
Exemplo n.º 2
0
        private void InitDocument()
        {
            document.Style.StartArrowheadStyle.Shape = ArrowheadShape.None;
            document.Style.EndArrowheadStyle.Shape   = ArrowheadShape.None;

            int row         = 0;
            int col         = 0;
            int maxColCount = 5;
            int index       = 0;

            foreach (NPointShape pointShape in document.PointShapeStencil.PredefinedPointShapes)
            {
                // create the path representing the arrow head shape
                NCustomPath path = new NCustomPath((GraphicsPath)pointShape.Path.Clone(), pointShape.Closed? PathType.ClosedFigure: PathType.OpenFigure);

                // create a shape to host the path
                NCompositeShape shape = new NCompositeShape();
                shape.Primitives.AddChild(path);
                shape.UpdateModelBounds();

                // reposition the shape and add to active layer
                shape.Bounds = base.GetGridCell(row, col);
                document.ActiveLayer.AddChild(shape);

                // describe it
                string     str  = NExamplesHelper.InsertSpacesBeforeUppers(((PointShape)(index + 2)).ToString());
                NTextShape text = new NTextShape(str, base.GetGridCell(row + 1, col));
                document.ActiveLayer.AddChild(text);

                col++;
                index++;

                if (col > maxColCount)
                {
                    row += 2;
                    col  = 0;
                }
            }
        }