コード例 #1
0
        public override void Render(ref XmlTree tree)
        {
            foreach (var sheet in Services.FileService.GetStylesheets())
            {
                var nodeId = sheet.Path.TrimEnd(".css");
                var xNode  = XmlTreeNode.Create(this);
                xNode.NodeID = nodeId;
                xNode.Text   = nodeId;
                xNode.Action = "javascript:openStylesheet('" +
                               //Needs to be escaped for JS
                               HttpUtility.UrlEncode(sheet.Path) + "');";
                var styleSheetPropertyTree = new loadStylesheetProperty(this.app);
                xNode.Source      = styleSheetPropertyTree.GetTreeServiceUrl(nodeId);
                xNode.HasChildren = sheet.Properties.Any();
                xNode.Icon        = " icon-brackets";
                xNode.OpenIcon    = "icon-brackets";
                xNode.NodeType    = "stylesheet"; //this shouldn't be like this, it should be this.TreeAlias but the ui.config file points to this name.

                OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
                if (xNode != null)
                {
                    tree.Add(xNode);
                    OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty);
                }
            }
        }
コード例 #2
0
        public override void Render(ref XmlTree tree)
        {
            foreach (StyleSheet n in StyleSheet.GetAll())
            {
                XmlTreeNode xNode = XmlTreeNode.Create(this);
                xNode.NodeID = n.Id.ToString();
                xNode.Text   = n.Text;
                xNode.Action = "javascript:openStylesheet(" + n.Id + ");";
                loadStylesheetProperty styleSheetPropertyTree = new loadStylesheetProperty(this.app);
                xNode.Source      = styleSheetPropertyTree.GetTreeServiceUrl(n.Id);
                xNode.HasChildren = n.HasChildren;
                xNode.Icon        = "settingCss.gif";
                xNode.OpenIcon    = "settingCss.gif";
                xNode.NodeType    = "stylesheet"; //this shouldn't be like this, it should be this.TreeAlias but the ui.config file points to this name.

                OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
                if (xNode != null)
                {
                    tree.Add(xNode);
                    OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty);
                }
            }
        }
コード例 #3
0
        public override void Render(ref XmlTree tree)
        {            
            foreach (StyleSheet n in StyleSheet.GetAll())
            {
                XmlTreeNode xNode = XmlTreeNode.Create(this);
                xNode.NodeID = n.Id.ToString();
                xNode.Text = n.Text;
                xNode.Action = "javascript:openStylesheet(" + n.Id + ");";
                loadStylesheetProperty styleSheetPropertyTree = new loadStylesheetProperty(this.app);
                xNode.Source = styleSheetPropertyTree.GetTreeServiceUrl(n.Id);
				xNode.HasChildren = n.HasChildren;
                xNode.Icon = " icon-brackets";
                xNode.OpenIcon = "icon-brackets";
                xNode.NodeType = "stylesheet"; //this shouldn't be like this, it should be this.TreeAlias but the ui.config file points to this name.

                OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
                if (xNode != null)
                {
                    tree.Add(xNode);
                    OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty);
                }
                
            }
        }