Esempio n. 1
0
        public override IDock CreateLayout()
        {
            //var elementTreeDocument = new ElementTreeDocument
            //{
            //	Id    = "ElementTreeDocument",
            //	Title = "ElementTreeDocument"
            //};

            var elementTreeTool = new ElementTreeTool
            {
                Id    = "ElementTreeTool",
                Title = "ElementTreeTool"
            };

            var leftPaneTop = new ToolDock()
            {
                Id          = "LeftPaneTop",
                Title       = "LeftPaneTop",
                Proportion  = double.NaN,
                CurrentView = elementTreeTool,
                Views       = CreateList <IView>(elementTreeTool)
            };
            var leftPane = new LayoutDock()
            {
                Id          = "LeftPane",
                Title       = "LeftPane",
                Proportion  = double.NaN,
                Orientation = Orientation.Vertical,
                CurrentView = null,
                Views       = CreateList <IView>(leftPaneTop)
            };
            var leftSplitter = new SplitterDock()
            {
                Id    = "LeftSplitter",
                Title = "LeftSplitter"
            };
            var documentsPane = new DocumentDock()
            {
                Id          = "DocumentsPane",
                Title       = "DocumentsPane",
                Proportion  = double.NaN,
                CurrentView = null,
                Views       = CreateList <IView>()
                              //CurrentView = elementTreeDocument,
                              //Views = CreateList<IView>(elementTreeDocument)
            };
            var mainLayout = new LayoutDock
            {
                Id          = "MainLayout",
                Title       = "MainLayout",
                Proportion  = double.NaN,
                Orientation = Orientation.Horizontal,
                CurrentView = null,
                Views       = CreateList <IView>(leftPane, leftSplitter, documentsPane)
            };

            var mainView = new MainView
            {
                Id          = "Main",
                Title       = "Main",
                CurrentView = mainLayout,
                Views       = CreateList <IView>(mainLayout)
            };


            var root = CreateRootDock();

            root.Id             = "Root";
            root.Title          = "Root";
            root.CurrentView    = mainView;
            root.DefaultView    = mainView;
            root.Views          = CreateList <IView>(mainView);
            root.Left           = CreatePinDock();
            root.Left.Alignment = Alignment.Left;

            AddAllViews(root, mainView, mainLayout, documentsPane, leftSplitter, leftPane, leftPaneTop, elementTreeTool);

            return(root);
        }
Esempio n. 2
0
        public override IDock CreateLayout()
        {
            var elementTreeView = new ElementTreeTool()
            {
                Id    = "ElementTree",
                Title = "Element Tree"
            };

            var mainLayout = new LayoutDock()
            {
                Id          = $"MainLayout",
                Title       = "MainLayout",
                Proportion  = double.NaN,
                Orientation = Orientation.Horizontal,
                CurrentView = null,
                Views       = CreateList <IView>
                              (

                    #region LeftPane

                    new LayoutDock
                {
                    Id          = "LeftPane",
                    Title       = "LeftPane",
                    Proportion  = double.NaN,
                    Orientation = Orientation.Vertical,
                    CurrentView = null,
                    Views       = CreateList <IView>
                                  (
                        new ToolDock
                    {
                        Id          = "LeftPaneTop",
                        Title       = "LeftPaneTop",
                        Proportion  = double.NaN,
                        CurrentView = elementTreeView,
                        Views       = CreateList <IView>(elementTreeView)
                    },
                        new SplitterDock()
                    {
                        Id    = "RightPaneTopSplitter",
                        Title = "RightPaneTopSplitter"
                    },
                        new ToolDock
                    {
                        Id          = "LeftPaneBottom",
                        Title       = "LeftPaneBottom",
                        Proportion  = double.NaN,
                        CurrentView = null,
                        Views       = CreateList <IView>()
                    }
                                  ),
                },
                    new SplitterDock()
                {
                    Id    = "LeftSplitter",
                    Title = "LeftSplitter"
                },

                    #endregion

                    #region DocumentsPane

                    new DocumentDock
                {
                    Id          = "DocumentsPane",
                    Title       = "DocumentsPane",
                    Proportion  = double.NaN,
                    CurrentView = null,
                    Views       = CreateList <IView>()
                },

                    #endregion

                    #region RightPane

                    new SplitterDock()
                {
                    Id    = "RightSplitter",
                    Title = "RightSplitter"
                },
                    new LayoutDock
                {
                    Id          = "RightPane",
                    Title       = "RightPane",
                    Proportion  = double.NaN,
                    Orientation = Orientation.Vertical,
                    CurrentView = null,
                    Views       = CreateList <IView>
                                  (
                        new ToolDock
                    {
                        Id          = "RightPaneTop",
                        Title       = "RightPaneTop",
                        Proportion  = double.NaN,
                        CurrentView = null,
                        Views       = CreateList <IView>()
                    },
                        new SplitterDock()
                    {
                        Id    = "RightPaneTopSplitter",
                        Title = "RightPaneTopSplitter"
                    },
                        new ToolDock
                    {
                        Id          = "RightPaneBottom",
                        Title       = "RightPaneBottom",
                        Proportion  = double.NaN,
                        CurrentView = null,
                        Views       = CreateList <IView>()
                    }
                                  )
                }

                    #endregion

                              )
            };

            var mainView = new MainView
            {
                Id          = "Main",
                Title       = "Main",
                CurrentView = mainLayout,
                Views       = CreateList <IView>(mainLayout)
            };

            var root = CreateRootDock();

            root.Id               = "Root";
            root.Title            = "Root";
            root.CurrentView      = mainView;
            root.DefaultView      = mainView;
            root.Views            = CreateList <IView>(mainView);
            root.Top              = CreatePinDock();
            root.Top.Alignment    = Alignment.Top;
            root.Bottom           = CreatePinDock();
            root.Bottom.Alignment = Alignment.Bottom;
            root.Left             = CreatePinDock();
            root.Left.Alignment   = Alignment.Left;
            root.Right            = CreatePinDock();
            root.Right.Alignment  = Alignment.Right;

            return(root);
        }