예제 #1
0
        protected override void RenderContents(HtmlTextWriter output)
        {
            var extensionPointManager = new ExtensionPointManager();

            var str = new StringBuilder();

            var filter = new CompositeFilter()
                         .And(new FilterByHostMenu(this.IsHost))
                         .And(new FilterByUnauthenticated(HttpContext.Current.Request.IsAuthenticated));

            foreach (var extension in extensionPointManager.GetToolBarButtonExtensionPoints(Module, Group, filter))
            {
                if (extension is IToolBarMenuButtonExtensionPoint)
                {
                    btnRenderer = new ToolBarMenuButtonRenderer();
                    str.AppendFormat(btnRenderer.GetOutput(extension));
                }
                else
                {
                    btnRenderer = new ToolBarButtonRenderer();
                    str.AppendFormat(btnRenderer.GetOutput(extension));
                }
            }

            output.Write(str.ToString());
        }
        protected override void RenderContents(HtmlTextWriter output)
        {
            var extensionPointManager = new ExtensionPointManager();

            var str = new StringBuilder();

            var filter = new CompositeFilter()
                .And(new FilterByHostMenu(this.IsHost))
                .And(new FilterByUnauthenticated(HttpContext.Current.Request.IsAuthenticated));

            foreach (var extension in extensionPointManager.GetToolBarButtonExtensionPoints(Module, Group, filter))
            {
                if (extension is IToolBarMenuButtonExtensionPoint)
                {
                    btnRenderer = new ToolBarMenuButtonRenderer();
                    str.AppendFormat(btnRenderer.GetOutput(extension));
                }
                else
                {
                    btnRenderer = new ToolBarButtonRenderer();
                    str.AppendFormat(btnRenderer.GetOutput(extension));
                }
            }
            
            output.Write(str.ToString());
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            var extensionPointManager = new ExtensionPointManager();

            var str = new StringBuilder();

            var filter = new CompositeFilter()
                .And(new FilterByHostMenu(Globals.IsHostTab(PortalController.GetCurrentPortalSettings().ActiveTab.TabID)))
                .And(new FilterByUnauthenticated(HttpContext.Current.Request.IsAuthenticated));
            
            foreach (var extension in extensionPointManager.GetToolBarButtonExtensionPoints(Module, Group, filter))
            {
                if (extension is IToolBarMenuButtonExtensionPoint)
                {
                    btnRenderer = new ToolBarMenuButtonRenderer();
                    str.AppendFormat(btnRenderer.GetOutput(extension));
                } 
                else 
                {
                    btnRenderer = new ToolBarButtonRenderer();
                    str.AppendFormat(btnRenderer.GetOutput(extension));
                }                
            }

            content = str.ToString();
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            var extensionPointManager = new ExtensionPointManager();

            var str = new StringBuilder();

            foreach (var extension in extensionPointManager.GetToolBarButtonExtensionPoints(Module, Group))
            {
                if (extension is IToolBarMenuButtonExtensionPoint)
                {
                    btnRenderer = new ToolBarMenuButtonRenderer();
                    str.AppendFormat(btnRenderer.GetOutput(extension));
                } else 
                {
                    btnRenderer = new ToolBarButtonRenderer();
                    str.AppendFormat(btnRenderer.GetOutput(extension));
                }
                
            }

            content = str.ToString();
        }
예제 #5
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            var extensionPointManager = new ExtensionPointManager();

            var str = new StringBuilder();

            foreach (var extension in extensionPointManager.GetToolBarButtonExtensionPoints(Module, Group))
            {
                if (extension is IToolBarMenuButtonExtensionPoint)
                {
                    btnRenderer = new ToolBarMenuButtonRenderer();
                    str.AppendFormat(btnRenderer.GetOutput(extension));
                }
                else
                {
                    btnRenderer = new ToolBarButtonRenderer();
                    str.AppendFormat(btnRenderer.GetOutput(extension));
                }
            }

            content = str.ToString();
        }