Debian Codegraph @

docs/csharp/Index.aspx

raw
1 <%@ Page Language="C#" EnableViewState="False" %>
2
3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <html>
5
6 <head>
7 <title>Berkeley DB .NET API Documentation - Table of Content</title>
8 <link rel="stylesheet" href="TOC.css">
9 <script type="text/javascript" src="TOC.js"></script>
10 </head>
11
12 <body onload="javascript: Initialize();" onresize="javascript: ResizeTree();">
13 <form id="IndexForm" runat="server">
14
15 <div id="TOCDiv" class="TOCDiv">
16
17 <div id="divSearchOpts" class="SearchOpts" style="height: 100px; display: none;">
18 <img class="TOCLink" onclick="javascript: ShowHideSearch(false);"
19 src="CloseSearch.png" height="17" width="17" alt="Hide search" style="float: right;"/>
20 Keyword(s) for which to search:
21 <input id="txtSearchText" type="text" style="width: 100%;"
22 onkeypress="javascript: return OnSearchTextKeyPress(event);" /><br />
23 <input id="chkSortByTitle" type="checkbox" /><label for="chkSortByTitle">&nbsp;Sort results by title</label><br />
24 <input type="button" value="Search" onclick="javascript: return PerformSearch();" />
25 </div>
26
27 <div id="divIndexOpts" class="IndexOpts" style="height: 25px; display: none;">
28 <img class="TOCLink" onclick="javascript: ShowHideIndex(false);"
29 src="CloseSearch.png" height="17" width="17" alt="Hide index" style="float: right;"/>
30 Keyword Index
31 </div>
32
33 <div id="divNavOpts" class="NavOpts" style="height: 20px;">
34 <img class="TOCLink" onclick="javascript: SyncTOC();" src="SyncTOC.gif"
35 height="16" width="16" alt="Sync to TOC"/>
36 <img class="TOCLink" onclick="javascript: ExpandOrCollapseAll(true);"
37 src="ExpandAll.bmp" height="16" width="16" alt="Expand all "/>
38 <img class="TOCLink" onclick="javascript: ExpandOrCollapseAll(false);"
39 src="CollapseAll.bmp" height="16" width="16" alt="Collapse all" />
40 <img class="TOCLink" onclick="javascript: ShowHideIndex(true);"
41 src="Index.gif" height="16" width="16" alt="Index" />
42 <img class="TOCLink" onclick="javascript: ShowHideSearch(true);"
43 src="Search.gif" height="16" width="16" alt="Search" />
44 </div>
45
46 <div class="Tree" id="divSearchResults" style="display: none;"
47 onselectstart="javascript: return false;">
48 </div>
49
50 <div class="Tree" id="divIndexResults" style="display: none;"
51 onselectstart="javascript: return false;">
52 </div>
53
54 <div class="Tree" id="divTree" onselectstart="javascript: return false;">
55 <asp:Literal ID="lcTOC" runat="server" />
56 </div>
57
58 </div>
59
60 <div id="TOCSizer" class="TOCSizer" onmousedown="OnMouseDown(event)" onselectstart="javascript: return false;"></div>
61
62 <iframe id="TopicContent" name="TopicContent" class="TopicContent" src="html/N_BerkeleyDB.htm">
63 This page uses an IFRAME but your browser does not support it.
64 </iframe>
65
66 </form>
67
68 </body>
69
70 </html>
71
72 <script runat="server">
73 //=============================================================================
74 // System : Sandcastle Help File Builder
75 // File : Index.aspx
76 // Author : Eric Woodruff ([email protected])
77 // Updated : 04/10/2008
78 // Note : Copyright 2007-2008, Eric Woodruff, All rights reserved
79 // Compiler: Microsoft C#
80 //
81 // This file contains the code used to display the index page for a website
82 // produced by the help file builder. The root nodes are loaded for the table
83 // of content. Child nodes are loaded dynamically when first expanded using
84 // an Ajax call.
85 //
86 // This code is published under the Microsoft Public License (Ms-PL). A copy
87 // of the license should be distributed with the code. It can also be found
88 // at the project website: http://SHFB.CodePlex.com. This notice, the
89 // author's name, and all copyright notices must remain intact in all
90 // applications, documentation, and source files.
91 //
92 // Version Date Who Comments
93 // ============================================================================
94 // 1.5.0.0 06/21/2007 EFW Created the code
95 //=============================================================================
96
97 protected void Page_Load(object sender, EventArgs e)
98 {
99 StringBuilder sb = new StringBuilder(10240);
100 string id, url, target, title;
101
102 XPathDocument toc = new XPathDocument(Server.MapPath("WebTOC.xml"));
103 XPathNavigator navToc = toc.CreateNavigator();
104 XPathNodeIterator root = navToc.Select("HelpTOC/*");
105
106 foreach(XPathNavigator node in root)
107 {
108 if(node.HasChildren)
109 {
110 // Write out a parent TOC entry
111 id = node.GetAttribute("Id", String.Empty);
112 title = node.GetAttribute("Title", String.Empty);
113 url = node.GetAttribute("Url", String.Empty);
114
115 if(!String.IsNullOrEmpty(url))
116 target = " target=\"TopicContent\"";
117 else
118 {
119 url = "#";
120 target = String.Empty;
121 }
122
123 sb.AppendFormat("<div class=\"TreeNode\">\r\n" +
124 "<img class=\"TreeNodeImg\" " +
125 "onclick=\"javascript: Toggle(this);\" " +
126 "src=\"Collapsed.gif\"/><a class=\"UnselectedNode\" " +
127 "onclick=\"javascript: return Expand(this);\" " +
128 "href=\"{0}\"{1}>{2}</a>\r\n" +
129 "<div id=\"{3}\" class=\"Hidden\"></div>\r\n</div>\r\n",
130 url, target, HttpUtility.HtmlEncode(title), id);
131 }
132 else
133 {
134 title = node.GetAttribute("Title", String.Empty);
135 url = node.GetAttribute("Url", String.Empty);
136
137 if(String.IsNullOrEmpty(url))
138 url = "about:blank";
139
140 // Write out a TOC entry that has no children
141 sb.AppendFormat("<div class=\"TreeItem\">\r\n" +
142 "<img src=\"Item.gif\"/>" +
143 "<a class=\"UnselectedNode\" " +
144 "onclick=\"javascript: return SelectNode(this);\" " +
145 "href=\"{0}\" target=\"TopicContent\">{1}</a>\r\n" +
146 "</div>\r\n", url, HttpUtility.HtmlEncode(title));
147 }
148 }
149
150 lcTOC.Text = sb.ToString();
151 }
152 </script>