本文整理汇总了C#中umbraco.cms.presentation.Trees.XmlTreeNode类的典型用法代码示例。如果您正苦于以下问题:C# XmlTreeNode类的具体用法?C# XmlTreeNode怎么用?C# XmlTreeNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlTreeNode类属于umbraco.cms.presentation.Trees命名空间,在下文中一共展示了XmlTreeNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: BaseContentTree_BeforeNodeRender
void BaseContentTree_BeforeNodeRender(ref XmlTree sender, ref XmlTreeNode node, EventArgs e)
{
if (node.NodeType == "content")
{
try
{
int index = node.Menu.FindIndex(delegate(IAction a) { return a.Alias == "publish"; }) + 1;
node.Menu.Insert(index, MailingAction.Instance);
}
catch { }
}
}
开发者ID:petereysermans,项目名称:umbraco-mailengine,代码行数:12,代码来源:AddMailingActionEvent.cs
示例17: CreateRootNode
protected override void CreateRootNode(ref XmlTreeNode rootNode)
{
// only show member types if we're using umbraco members on the website
if (Member.InUmbracoMemberMode())
{
rootNode.NodeType = "init" + TreeAlias;
rootNode.NodeID = "init";
}
else
{
rootNode = null;
}
}
开发者ID:phaniarveti,项目名称:Experiments,代码行数:13,代码来源:loadMemberTypes.cs
示例18: BaseTree_BeforeNodeRender
protected void BaseTree_BeforeNodeRender(ref XmlTree sender, ref XmlTreeNode node, EventArgs e)
{
XmlNode xmlNode = null;
switch (node.NodeType.ToUpper())
{
case "content":
xmlNode = this.GetContentXmlNode(node.NodeID);
break;
case "media":
xmlNode = this.GetMediaXmlNode(node.NodeID);
break;
case "member":
xmlNode = this.GetMemberXmlNode(node.NodeID);
break;
default:
break;
}
// if we have an XML node...
if (xmlNode != null && PageStateIconsConfigurationSection.Instance != null)
{
// ... match rules
foreach (RuleElement rule in PageStateIconsConfigurationSection.Instance.Rules)
{
// apply XPath
var xpath = string.Concat("self::*[", rule.XPath, "]");
if (xmlNode.SelectSingleNode(xpath) != null)
{
switch (rule.IconType)
{
case IconType.overlay:
// add custom class for overlay
node.Style.AddCustom(string.Format("overlay-{0}", Casing.SafeAlias(rule.Name)));
break;
case IconType.icon:
node.Icon = rule.IconPath;
break;
default:
break;
}
}
}
}
}
开发者ID:umBristol,项目名称:umbraco-page-state-icons,代码行数:50,代码来源:Application.cs
示例19: CreateRootNode
/// <summary>
/// Creates the root node.
/// </summary>
/// <param name="rootNode">The root node.</param>
protected override void CreateRootNode(ref XmlTreeNode rootNode)
{
if (!this.SetNullTreeRootNode(StartNodeID, ref rootNode, app))
{
rootNode.Action = "javascript:openContent(-1);";
rootNode.Source = this.GetTreeServiceUrlWithParams(StartNodeID, this.GetDataTypeId());
if (StartNodeID > 0)
{
var startNode = new Document(StartNodeID);
rootNode.Text = startNode.Text;
rootNode.Icon = startNode.ContentTypeIcon;
}
}
}
开发者ID:kgiszewski,项目名称:ContentPicker,代码行数:18,代码来源:ContentPicker_FilteredTree.cs
示例20: CreateRootNode
protected override void CreateRootNode(ref XmlTreeNode rootNode)
{
rootNode.Icon = "bin_empty.png";
rootNode.OpenIcon = "bin.png";
//we made this alias the same as media, so the node name would be media,
//we need to make it recycle bin
TreeDefinition treeDef = TreeDefinitionCollection.Instance.FindTree(this);
rootNode.Text = rootNode.Text = GetTreeHeader(treeDef.Tree.Alias);
if (new RecycleBin(Media._objectType, RecycleBin.RecycleBinType.Media).Smells())
{
rootNode.Icon = "bin.png";
}
else
rootNode.Source = null;
}
开发者ID:elrute,项目名称:Triphulcas,代码行数:15,代码来源:MediaRecycleBin.cs
注:本文中的umbraco.cms.presentation.Trees.XmlTreeNode类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论