本文整理汇总了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;
}
示例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;
}
示例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);
}
}
示例4: CreateRootNode
protected override void CreateRootNode(ref XmlTreeNode rootNode)
{
rootNode.Icon = FolderIcon;
rootNode.OpenIcon = FolderIconOpen;
rootNode.NodeType = "init" + TreeAlias;
rootNode.NodeID = "init";
}
示例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)
{
}
}
}
示例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);
}
示例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");
}
示例8: LegacyTreeController
public LegacyTreeController(XmlTreeNode xmlTreeNode, string treeAlias, string currentSection, UrlHelper urlHelper)
{
_xmlTreeNode = xmlTreeNode;
_treeAlias = treeAlias;
_currentSection = currentSection;
_rootDisplay = xmlTreeNode.Text;
Url = urlHelper;
}
示例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;
}
}
示例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";
}
示例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();
}
示例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 };
}
示例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;
}
}
示例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);
}
示例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";
}