Exemple #1
0
        /**
         * Creates a default view pane for the specified tab ID.
         */

        private void CreateDefaultPane(string tabId, string[] tabResourceTypes, int tabLinkType)
        {
            ViewsCategoriesPane pane = new ViewsCategoriesPane();

            pane.RootResource = Core.ResourceTreeManager.ResourceTreeRoot;

            ContentTypeFilter filter = new ContentTypeFilter();

            if (tabResourceTypes != null)
            {
                string[] filterTypes = new string [tabResourceTypes.Length + 1];
                filterTypes [0] = "WorkspaceOtherView";
                Array.Copy(tabResourceTypes, 0, filterTypes, 1, tabResourceTypes.Length);
                filter.SetFilter(filterTypes, tabLinkType);
            }
            else
            {
                filter.SetFilter(tabResourceTypes, tabLinkType);
            }
            pane.AddContentTypes(tabResourceTypes);
            pane.AddNodeFilter(filter);
            pane.ShowWorkspaceOtherView = true;

            AddPane(tabId, StandardViewPanes.ViewsCategories, pane, "Views and Categories", _defaultPaneImage);
        }
Exemple #2
0
        /**
         * Registers a resource pane that will display the resource structure (and will
         * be combined with the "Views and Categories" pane) on the specified resource type tab.
         */

        public void RegisterResourceStructurePane(string paneId, string tabId, string caption,
                                                  Image icon, AbstractViewPane viewPane)
        {
            RegisterActivateAction(tabId, paneId, caption);
            AddPane(tabId, paneId, viewPane, caption, icon);
            RegisterResourceStructurePane(tabId, paneId);

            if (viewPane is JetResourceTreePane)
            {
                ViewsCategoriesPane viewsCategoriesPane = (ViewsCategoriesPane)GetPane(tabId, StandardViewPanes.ViewsCategories);
                viewsCategoriesPane.ShowWorkspaceOtherView = false;
            }
        }
Exemple #3
0
        /**
         * Registers a resource structure pane based on a ResourceTreeView.
         */

        public IResourceTreePane RegisterResourceStructureTreePane(string paneId, string tabId, string caption,
                                                                   Image icon, IResource rootResource)
        {
            JetResourceTreePane pane = new JetResourceTreePane();

            pane.RootResource     = rootResource;
            pane.RootResourceType = null;
            RegisterResourceStructurePane(paneId, tabId, caption, icon, pane);

            ViewsCategoriesPane viewsCategoriesPane = (ViewsCategoriesPane)GetPane(tabId, StandardViewPanes.ViewsCategories);

            viewsCategoriesPane.ShowWorkspaceOtherView = false;

            return(pane);
        }
        [SetUp] public void SetUp()
        {
            _core    = new TestCore();
            _storage = _core.ResourceStore;

            _workspaceManager = Core.WorkspaceManager;

            _workspaceManager.RegisterWorkspaceType("Category",
                                                    new int[] { (Core.CategoryManager as CategoryManager).PropCategory }, WorkspaceResourceType.Filter);
            _workspace = _workspaceManager.CreateWorkspace("WS");

            _storage.ResourceTypes.Register("Folder", "Name");
            _storage.ResourceTypes.Register("Email", "Name");

            _treePane = new ViewsCategoriesPane();
        }