本文整理汇总了C#中umbraco.cms.presentation.Trees.XmlTree.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# XmlTree.Clear方法的具体用法?C# XmlTree.Clear怎么用?C# XmlTree.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类umbraco.cms.presentation.Trees.XmlTree
的用法示例。
在下文中一共展示了XmlTree.Clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Render
public override void Render(ref XmlTree tree)
{
tree.Clear();
var operators = XmlTreeNode.Create(this);
operators.NodeID = "operators";
operators.Text = "Operators";
operators.Icon = "member.gif";
operators.Action = "javascript:openOperators()";
operators.Menu.Clear();
operators.Menu.Add(ActionAddOperator.Instance);
tree.Add(operators);
var operatorMedia = XmlTreeNode.Create(this);
operatorMedia.NodeID = "operatorMedia";
operatorMedia.Text = "Operator Media";
operatorMedia.Icon = "node_icons_media.png";
operatorMedia.Action = "javascript:openOperatorMedia()";
operatorMedia.Menu.Clear();
tree.Add(operatorMedia);
var albums = XmlTreeNode.Create(this);
albums.NodeID = "albums";
albums.Text = "Albums";
albums.Icon = "node_icons_album.png";
albums.Action = "javascript:openAlbums()";
albums.Menu.Clear();
albums.Menu.Add(ActionAddAlbum.Instance);
tree.Add(albums);
var images = XmlTreeNode.Create(this);
images.NodeID = "images";
images.Text = "Images";
images.Icon = "node_icons_images.png";
images.Action = "javascript:openImages()";
images.Menu.Clear();
tree.Add(images);
var brochures = XmlTreeNode.Create(this);
brochures.NodeID = "brochures";
brochures.Text = "Brochures";
brochures.Icon = "node_icons_brochures.png";
brochures.Action = "javascript:openBrochures()";
brochures.Menu.Clear();
tree.Add(brochures);
var channels = XmlTreeNode.Create(this);
channels.NodeID = "channels";
channels.Text = "Channels";
channels.Icon = "node_icons_channel.png";
channels.Action = "javascript:openChannels()";
channels.Menu.Clear();
channels.Menu.Add(ActionAddChannel.Instance);
tree.Add(channels);
var videos = XmlTreeNode.Create(this);
videos.NodeID = "videos";
videos.Text = "Videos";
videos.Icon = "mediaMovie.gif";
videos.Action = "javascript:openVideos()";
videos.Menu.Clear();
tree.Add(videos);
var searchMedia = XmlTreeNode.Create(this);
searchMedia.NodeID = "searchMedia";
searchMedia.Text = "Search Media";
searchMedia.Icon = "search.png";
searchMedia.Action = "javascript:openSearchMedia()";
searchMedia.Menu.Clear();
tree.Add(searchMedia);
var searchOperatorMedia = XmlTreeNode.Create(this);
searchOperatorMedia.NodeID = "searchOperatorMedia";
searchOperatorMedia.Text = "Search Operator Media";
searchOperatorMedia.Icon = "search.png";
searchOperatorMedia.Action = "javascript:openSearchOperatorMedia()";
searchOperatorMedia.Menu.Clear();
tree.Add(searchOperatorMedia);
var settings = XmlTreeNode.Create(this);
settings.NodeID = "settings";
settings.Text = "Settings";
settings.Icon = "node_icons_settings.png";
settings.Action = "javascript:openSettings()";
settings.Menu.Clear();
tree.Add(settings);
}