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


C# TreeNode.AddEditorMenuItem方法代码示例

本文整理汇总了C#中TreeNode.AddEditorMenuItem方法的典型用法代码示例。如果您正苦于以下问题:C# TreeNode.AddEditorMenuItem方法的具体用法?C# TreeNode.AddEditorMenuItem怎么用?C# TreeNode.AddEditorMenuItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TreeNode的用法示例。


在下文中一共展示了TreeNode.AddEditorMenuItem方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CustomizeFolderNode

 /// <summary>
 /// Adds the menu items to the node and sets the icon
 /// </summary>
 /// <param name="n"></param>
 /// <param name="queryStrings"></param>
 protected virtual void CustomizeFolderNode(TreeNode n, FormCollection queryStrings)
 {
     //add the menu items
     n.AddEditorMenuItem<CreateItem>(this, "createUrl", "CreateNew");
     n.AddEditorMenuItem<Delete>(this, "deleteUrl", "Delete");
     n.AddMenuItem<Reload>();
 }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:12,代码来源:AbstractFileSystemTreeController.cs

示例2: CustomizeFileNode

 /// <summary>
 /// Adds the menu items to the node and sets the icon
 /// </summary>
 /// <param name="n"></param>
 /// <param name="queryStrings"></param>
 protected virtual void CustomizeFileNode(TreeNode n, FormCollection queryStrings)
 {
     n.HasChildren = false;
     n.Icon = "tree-doc";
     //add the menu items
     n.AddEditorMenuItem<Delete>(this, "deleteUrl", "Delete");
 }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:12,代码来源:AbstractFileSystemTreeController.cs

示例3: CustomizeFileNode

        protected override void CustomizeFileNode(TreeNode n, FormCollection queryStrings)
        {
            n.AddEditorMenuItem<CreateItem>(this, "createUrl", "EditRule");
            base.CustomizeFileNode(n, queryStrings);            
            n.AddMenuItem<Reload>();

            n.Icon = "tree-css";

            using (var uow = Hive.CreateReadonly())
            {
                var stylesheet = uow.Repositories.Get<File>(n.HiveId);
                var rules = StylesheetHelper.ParseRules(stylesheet);                
                n.HasChildren = rules.Count() > 0;
                if (n.HasChildren)
                {
                    n.JsonUrl = Url.GetTreeUrl(GetType(), n.HiveId, queryStrings);
                }

            }
        }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:20,代码来源:StylesheetTreeController.cs

示例4: AddMenuItemsToRootNode

        /// <summary>
        /// Adds menu items to root node
        /// </summary>
        /// <param name="n"></param>
        /// <param name="queryStrings"></param>
        protected virtual void AddMenuItemsToRootNode(TreeNode n, FormCollection queryStrings)
        {
            if (!queryStrings.GetValue<bool>(TreeQueryStringParameters.DialogMode))
            {
                //add some menu items to the created root node
                n.AddEditorMenuItem<CreateItem>(this, "createUrl", "CreateNew");
                n.AddEditorMenuItem<Sort>(this, "sortUrl", "Sort");
                n.AddMenuItem<Reload>();
            }

        }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:16,代码来源:ContentTreeController.cs

示例5: AddMenuItemsToNode

 /// <summary>
 /// Adds menu items to each node
 /// </summary>
 /// <param name="n"></param>
 /// <param name="queryStrings"></param>
 protected override void AddMenuItemsToNode(TreeNode n, FormCollection queryStrings)
 {
     if (!queryStrings.GetValue<bool>(TreeQueryStringParameters.DialogMode))
     {
         //add the menu items
         n.AddEditorMenuItem<CreateItem>(this, "createUrl", "CreateNew");
         //we need to add the recycle bin Id to the metadata so that the UI knows to refresh the bin on delete
         n.AddEditorMenuItem<Delete>(this, "deleteUrl", "Delete", new Dictionary<string, object> {{"recycleBinId", RecycleBinId.ToJsonObject()}});
         n.AddEditorMenuItem<Move>(this, "moveUrl", "Move");
         n.AddEditorMenuItem<Copy>(this, "copyUrl", "Copy");
         n.AddEditorMenuItem<Sort>(this, "sortUrl", "Sort");
         n.AddEditorMenuItem<Rollback>(this, "rollbackUrl", "Rollback");
         n.AddEditorMenuItem<Publish>(this, "publishUrl", "Publish");
         n.AddEditorMenuItem<Permissions>(this, "permissionsUrl", "Permissions");
         n.AddEditorMenuItem<PublicAccess>(this, "publicAccessUrl", "PublicAccess");
         //n.AddMenuItem<Protect>();
         //n.AddMenuItem<Audit>();
         //n.AddMenuItem<Notify>();
         //nodeData.treeNode.AddMenuItem<SendTranslate>(MenuItems);
         n.AddEditorMenuItem<Hostname>(this, "hostnameUrl", "Hostname");
         n.AddEditorMenuItem<Language>(this, "languageUrl", "Language");
         n.AddMenuItem<Reload>();
     }
 }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:29,代码来源:ContentTreeController.cs

示例6: AddMenuItemsToNodeInRecycleBin

 protected override void AddMenuItemsToNodeInRecycleBin(TreeNode n, FormCollection queryStrings)
 {
     if (!queryStrings.GetValue<bool>(TreeQueryStringParameters.DialogMode))
     {
         //TODO: implement security restrictions here!
         //add the menu items
         n.AddEditorMenuItem<Move>(this, "moveUrl", "Move");
         n.AddEditorMenuItem<Delete>(this, "deleteUrl", "Delete");
         n.AddMenuItem<Reload>();
     }
 }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:11,代码来源:ContentTreeController.cs


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