[Mono-docs-list] aspx monodoc beginnings

John Luke jluke@cfl.rr.com
09 Jul 2003 17:49:28 -0400


--=-UdgE8cRKJH6akHH+XtOL
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Here is a slightly updated and cleaned up version.
It now consists of 3 files:
monodoc.aspx
monodoc.js
monodoc.css

John

--=-UdgE8cRKJH6akHH+XtOL
Content-Disposition: attachment; filename=monodoc.aspx
Content-Type: application/x-asp; name=monodoc.aspx
Content-Transfer-Encoding: 7bit

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Diagnostics" %>
<html>
<head>
<link rel="stylesheet" type="text/css" href="monodoc.css">

<script runat="server">

	public void Page_Load (object sender, EventArgs e)
	{
		string link = (string) Request.Params["link"];
		if (link == null)
			link = "N:System";
			
		LoadDocs (link);
	}
	
	void LoadDocs (string path)
	{
		string args = "--html " + path;
		ProcessStartInfo psi = new ProcessStartInfo ();
		psi.RedirectStandardOutput = true;
		psi.FileName = "monodoc";
		psi.Arguments = args;
		Process p = Process.Start (psi);
		
		mySpan.InnerText = p.StandardOutput.ReadToEnd ();
	}
	
</script>
<script src="monodoc.js" />

<title>Mono Documentation</title>
</head>
<body onLoad="load()">

<div class="menu">
<!-- replace with an asp.net tree -->
<a href="source-id:3:xhtml:html/en/index.html">Handbook</a><br />
<a href="N:System"/>System</a><br />
<a href="N:Gtk"/>Gtk#</a>
</div>

<div class="main">
<span id="mySpan" runat="server" />
</div>

</body>
</html>

--=-UdgE8cRKJH6akHH+XtOL
Content-Disposition: attachment; filename=monodoc.css
Content-Type: text/css; name=monodoc.css; charset=UTF-8
Content-Transfer-Encoding: 7bit

DIV.menu {
border: 1px solid;
border-color: black;
background-color: #EEEEEE;
padding: 5px;
position: absolute;
top: 10px;
left: 10px;
width: 170px;
min-height: 200px;
}

DIV.main {
border: 1px solid;
border-color: black;
padding: 5px;
position: absolute;
top: 10px;
left: 200px;
}

A:link {color: blue; background: none; text-decoration: none; }
A:active {color: blue; background: none; text-decoration: none; }
A:hover {color: blue; background: none; text-decoration: none; }
A:visited {color: blue; background: none; text-decoration: none; }

--=-UdgE8cRKJH6akHH+XtOL
Content-Disposition: attachment; filename=monodoc.js
Content-Type: text/plain; name=monodoc.js; charset=UTF-8
Content-Transfer-Encoding: 7bit

	function load ()
    {
    	objs = document.getElementsByTagName("a");
    	for (i = 0; i < objs.length; i++)
    	{
    		objs[i].href = "monodoc.aspx?link=" + objs[i].href;
    	}
    }
    
    navLink(obj)
    {
        window.location= "monodoc.aspx?link=" + obj.href;
    }
        

--=-UdgE8cRKJH6akHH+XtOL--