当前位置: 首页>>代码示例>>C#>>正文


C# Trees.XmlTreeNode类代码示例

本文整理汇总了C#中umbraco.cms.presentation.Trees.XmlTreeNode的典型用法代码示例。如果您正苦于以下问题:C# XmlTreeNode类的具体用法?C# XmlTreeNode怎么用?C# XmlTreeNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XmlTreeNode类属于umbraco.cms.presentation.Trees命名空间,在下文中一共展示了XmlTreeNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnRenderFileNode

 protected override void OnRenderFileNode(ref XmlTreeNode xNode)
 {
     xNode.Action = xNode.Action.Replace("openFile", "openConfigEditor");
     xNode.Menu = new List<IAction>();
     xNode.Icon = "../../images/umbraco/settingCss.gif";
     xNode.OpenIcon = xNode.Icon;
 }
开发者ID:BarryFogarty,项目名称:ubootstrap,代码行数:7,代码来源:LoadLessFiles.cs

示例2: OnRenderFileNode

        protected override void OnRenderFileNode(ref XmlTreeNode xNode)
        {

            xNode.Action = xNode.Action.Replace("openFile", "openDLRScript");
            string ex = xNode.Text.Substring(xNode.Text.LastIndexOf('.')).Trim('.').ToLower();
            string icon = "developerScript.gif";

            switch (ex)
            {
                case "rb":
                    icon = "developerRuby.gif";
                    break;
                case "py":
                    icon = "developerPython.gif";
                    break;
                case "config":
                    //remove all config files
                    xNode = null;
                    return;
                default:
                    icon = "developerScript.gif";
                    break;
            }

            xNode.Icon = icon;
            xNode.OpenIcon = icon;
        }
开发者ID:phaniarveti,项目名称:Experiments,代码行数:27,代码来源:loadDLRScripts.cs

示例3: FileSystemTree_AfterNodeRender

 void FileSystemTree_AfterNodeRender(ref XmlTree sender, ref XmlTreeNode node, EventArgs e)
 {
     if (node.TreeType == "scripts" && new Core().GetPossibleExtensions(Enums.TranslatorType.Script).Contains(Path.GetExtension(node.NodeID)))
     {
         sender.Remove(node);
     }
 }
开发者ID:Jeavon,项目名称:BundlingAndMinificationForTheMasses,代码行数:7,代码来源:StartUpHandlers.cs

示例4: CreateRootNode

 protected override void CreateRootNode(ref XmlTreeNode rootNode)
 {
     rootNode.Icon = FolderIcon;
     rootNode.OpenIcon = FolderIconOpen;
     rootNode.NodeType = "init" + TreeAlias;
     rootNode.NodeID = "init";
 }
开发者ID:nunofilipecosta,项目名称:UmbracoLatest,代码行数:7,代码来源:CustomBackofficeTree.cs

示例5: BaseTree_BeforeNodeRender

        private void BaseTree_BeforeNodeRender(ref XmlTree sender, ref XmlTreeNode node, EventArgs e)
        {
            if (node.TreeType.ToLower() == "content")
            {
                try
                {
                    Document document = new Document(Convert.ToInt32(node.NodeID));

                    //this changes the create action b/c of the UI.xml entry
                    if (CreateDocTypes.Contains(document.ContentType.Alias))
                    {
                        node.NodeType = "uNews";
                    }

                    if (RemoveCreateDocTypes.Contains(document.ContentType.Alias))
                    {
                        node.Menu.Remove(ActionNew.Instance);
                    }
                }

                catch (Exception e2)
                {

                }
            }
        }
开发者ID:kgiszewski,项目名称:uNews,代码行数:26,代码来源:uNewsEvents.cs

示例6: BaseTree_BeforeNodeRender

 private void BaseTree_BeforeNodeRender(ref XmlTree sender, ref XmlTreeNode node, EventArgs e)
 {
     if (node.Menu == null || node.NodeType.ToLower() != "content") return;
     node.Menu.Insert(3, new TranslationCreationAction());
     node.Menu.Insert(3, ContextMenuSeperator.Instance);
     node.Menu.Insert(5, ContextMenuSeperator.Instance);
 }
开发者ID:purna,项目名称:Polyglot,代码行数:7,代码来源:MenuCustomisation.cs

示例7: CreateRootNode

        protected override void CreateRootNode(ref XmlTreeNode rootNode)
        {            

            if (this.IsDialog)
                rootNode.Action = "javascript:openMedia(-1);";
            else
                rootNode.Action = "javascript:" + ClientTools.Scripts.OpenDashboard("Media");
        }
开发者ID:phaniarveti,项目名称:Experiments,代码行数:8,代码来源:loadMedia.cs

示例8: LegacyTreeController

 public LegacyTreeController(XmlTreeNode xmlTreeNode, string treeAlias, string currentSection, UrlHelper urlHelper)
 {
     _xmlTreeNode = xmlTreeNode;
     _treeAlias = treeAlias;
     _currentSection = currentSection;
     _rootDisplay = xmlTreeNode.Text;
     Url = urlHelper;
 }
开发者ID:phaniarveti,项目名称:Experiments,代码行数:8,代码来源:LegacyTreeController.cs

示例9: BaseTree_BeforeNodeRender

        private void BaseTree_BeforeNodeRender(ref XmlTree sender, ref XmlTreeNode node, EventArgs e)
        {
            //LogHelper.Info<AddTranslationAction>(node.NodeType.ToLower());

            switch (node.NodeType.ToLower())
            {
                case "content":
                    try
                    {
                        var document = ApplicationContext.Current.Services.ContentService.GetById(Convert.ToInt32(node.NodeID));

                        var translationDocType = ApplicationContext.Current.Services.ContentTypeService.GetContentType(document.ContentType.Alias + BabelFishCreateTranslation.PropertySuffix);

                        /*
                        LogHelper.Info<AddTranslationAction>("translationDocType=>" + (translationDocType == null).ToString());
                        LogHelper.Info<AddTranslationAction>("document.ContentType=>" + (document.ContentType == null).ToString());
                        LogHelper.Info<AddTranslationAction>("translationDocType.ParentId=>" + (translationDocType.ParentId).ToString());
                        LogHelper.Info<AddTranslationAction>("document.ContentType.Id=>" + (document.ContentType.Id).ToString());
                        LogHelper.Info<AddTranslationAction>("translationDocType.PropertyTypeExists=>" + translationDocType.PropertyTypeExists(BabelFishCreateTranslation.LanguagePropertyAlias).ToString());
                        */

                        if (
                            translationDocType != null &&
                            document.ContentType != null &&
                            (translationDocType.ParentId == document.ContentType.Id) &&
                            translationDocType.PropertyTypeExists(BabelFishCreateTranslation.LanguagePropertyAlias))
                        {
                            node.Menu.Insert(7, ContextMenuSeperator.Instance);
                            node.Menu.Insert(8, ActionCreateTranslation.Instance);
                        }

                        //remove 'create' for 'BabelFishTranslationFolder'
                        if (document.ContentType.Alias == BabelFishCreateTranslation.BabelFishFolderDocTypeAlias)
                        {
                            node.Menu.Remove(ActionNew.Instance);
                        }

                        //remove 'create' for 'Translation' doctype
                        if (document.ContentType.Alias.EndsWith(BabelFishCreateTranslation.PropertySuffix))
                        {
                            node.Menu.Remove(ActionNew.Instance);

                            try
                            {
                                node.Icon = document.GetValue<string>(BabelFishCreateTranslation.LanguagePropertyAlias) + ".png";
                            }
                            catch {}
                        }
                    }
                    catch (Exception e2)
                    {
                        LogHelper.Error<AddTranslationAction>(e2.Message, e2);
                    }

                    break;
            }
        }
开发者ID:kgiszewski,项目名称:BabelFish,代码行数:57,代码来源:BabelFishEvents.cs

示例10: CreateRootNode

 protected override void CreateRootNode(ref XmlTreeNode rootNode)
 {
     rootNode.NodeID = System.Guid.NewGuid().ToString();
     rootNode.Action = "javascript:openExportToWordPage()";
     rootNode.Menu.Clear();
     rootNode.Menu.Add(ActionRefresh.Instance);
     rootNode.Icon = "../../plugins/AsposeMemberExportToWord/Images/aspose.ico";
     rootNode.OpenIcon = "../../plugins/AsposeMemberExportToWord/Images/aspose.ico";
 }
开发者ID:aspose-words,项目名称:Aspose.Words-for-.NET,代码行数:9,代码来源:MemberExportToWordTree.cs

示例11: LegacyTree

        public LegacyTree(ITree tree, string application, XmlTreeNode rootNode)
            : base(application)
        {
            _tree = tree;
            _rootNode = rootNode;

            //we need to re-initialize the class now that we have a root node
            Initialize();
        }
开发者ID:ChrisNikkel,项目名称:Umbraco-CMS,代码行数:9,代码来源:LegacyTree.cs

示例12: CreateRootNode

 protected override void CreateRootNode(ref XmlTreeNode rootNode)
 {
     rootNode.Text = "Less Files";
     rootNode.Icon = ".sprTreeFolder";
     rootNode.OpenIcon = ".sprTreeFolder_o";
     rootNode.NodeID = "initConfigFiles";
     rootNode.NodeType = rootNode.NodeID + "_" + TreeAlias;
     rootNode.Menu = new List<IAction> { ActionRefresh.Instance };
 }
开发者ID:BarryFogarty,项目名称:ubootstrap,代码行数:9,代码来源:LoadLessFiles.cs

示例13: BaseContentTreeOnAfterNodeRender

    private void BaseContentTreeOnAfterNodeRender(ref XmlTree sender, ref XmlTreeNode node, EventArgs eventArgs)
    {
        if (node.IsProtected.GetValueOrDefault(true) && umbraco.helper.GetCurrentUmbracoUser().UserType.Alias == "trainer")
        {
            //Writers cannot see protected pages
            //sender.
            string nodeType = node.NodeType;

        }
    }
开发者ID:smashraid,项目名称:Work,代码行数:10,代码来源:UmbracoEvent.cs

示例14: CreateRootNode

        protected override void CreateRootNode(ref XmlTreeNode rootNode)
        {
            rootNode.Icon = FolderIcon;
            rootNode.OpenIcon = FolderIconOpen;
            rootNode.NodeType = TreeAlias;
            rootNode.NodeID = "-1";

            rootNode.Menu.Clear();
            rootNode.Menu.Add(ActionRefresh.Instance);
        }
开发者ID:robgray,项目名称:f1speedguides,代码行数:10,代码来源:loadResults.cs

示例15: CreateRootNode

 protected override void CreateRootNode(ref XmlTreeNode rootNode)
 {
     // if we're using 3rd party membership providers we should use the Role terminology
     if (!Member.IsUsingUmbracoRoles())
     {
         rootNode.Text = ui.Text("memberRoles");
     }
     rootNode.NodeType = "init" + TreeAlias;
     rootNode.NodeID = "init";
 }
开发者ID:phaniarveti,项目名称:Experiments,代码行数:10,代码来源:loadMemberGroups.cs


注:本文中的umbraco.cms.presentation.Trees.XmlTreeNode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。