private TopicTreeNode NewTopicNode(DocumentationTopic topic) { TopicTreeNode topicNode = new TopicTreeNode(topic, topicContextMenuStrip); UpdateTopics(topic.Topics, topicNode); return(topicNode); }
private string MultiLevelTopic(DocumentationTopic topic) { JsonObject js = new JsonObject(); js.Add(Surround("type"), Surround("category")); js.Add(Surround("label"), Surround(topic.Title)); js.Add(Surround("items"), SidebarJsonTopics(topic, topic.Topics)); return(js.ToString()); }
private string SidebarJsonTopics(DocumentationTopic topic, List <DocumentationTopic> topics) { var extraTopics = new List <DocumentationTopic>(); extraTopics.Add(new DocumentationTopic() { Title = topic.Title, AlternativeTitle = "Overview" }); extraTopics.AddRange(topics); return(SidebarJsonTopics(extraTopics)); }
internal DocumentationTopic RetrieveTopic() { DocumentationTopic t = new DocumentationTopic() { Title = Text }; foreach (TopicTreeNode topicNode in Nodes) { DocumentationTopic topic = topicNode.RetrieveTopic(); t.Topics.Add(topic); } return(t); }
internal DocumentationSidebar RetrieveSidebar() { DocumentationSidebar s = new DocumentationSidebar() { Title = Text }; foreach (TopicTreeNode topicNode in Nodes) { DocumentationTopic topic = topicNode.RetrieveTopic(); s.Topics.Add(topic); } return(s); }
private string TopicSlug(DocumentationTopic topic) { return(topic.Title.Trim().Replace(' ', '-').ToLower()); }
public TopicTreeNode(DocumentationTopic topic) : base() { Text = (!string.IsNullOrWhiteSpace(topic.Title) ? topic.Title : "Untitled"); Tag = topic; }
public TopicTreeNode(DocumentationTopic topic, ContextMenuStrip topicContextMenuStrip) : this(topic) { ContextMenuStrip = topicContextMenuStrip; }