static int Main(string [] args) { HTML html; Window win; Application.Init(); html = new HTML(); win = new Window("Test"); ScrolledWindow sw = new ScrolledWindow(); win.Add(sw); sw.Add(html); HTMLStream s = html.Begin("text/html"); if (args.Length > 0) { using (StreamReader r = File.OpenText(args [0])) s.Write(r.ReadToEnd()); } else { s.Write("<html><body>"); s.Write("Hello world!"); } html.End(s, HTMLStreamStatus.Ok); win.ShowAll(); Application.Run(); return(0); }
static int Main (string [] args) { HTML html; Window win; Application.Init (); html = new HTML (); win = new Window ("Test"); ScrolledWindow sw = new ScrolledWindow (); win.Add (sw); sw.Add (html); HTMLStream s = html.Begin ("text/html"); if (args.Length > 0) { using (StreamReader r = File.OpenText (args [0])) s.Write (r.ReadToEnd ()); } else { s.Write ("<html><body>"); s.Write ("Hello world!"); } html.End (s, HTMLStreamStatus.Ok); win.ShowAll (); Application.Run (); return 0; }
void RenderChanges() { notebook.Page = 0; HTMLStream s = html.Begin("text/html"); if (changes != null) { s.Write("<h1>Pending Changes</h1>"); int i = 0; foreach (PendingChange ch in changes) { s.Write(String.Format("{3}: <a href=\"review:{0}${1}\">{2}</a><br>", ch.ID, ch.Serial, ch.Login, i++)); } } else { s.Write("<h1>No pending changes on the server</h1>"); } html.End(s, HTMLStreamStatus.Ok); }
public void Render(string html_code) { Gtk.HTMLStream stream = html_panel.Begin("text/html"); stream.Write(html_code); html_panel.End(stream, HTMLStreamStatus.Ok); }