Make the sample have good coding :-)
svn path=/trunk/gtk-sharp/; revision=36750
This commit is contained in:
parent
6eea226ab7
commit
12b8e718e1
1 changed files with 3 additions and 3 deletions
|
@ -14,9 +14,9 @@ class HTMLSample {
|
|||
win.Add (html);
|
||||
HTMLStream s = html.Begin ("text/html");
|
||||
|
||||
if (args.Length > 0){
|
||||
StreamReader r = new StreamReader (File.OpenRead (args [0]));
|
||||
s.Write (r.ReadToEnd ());
|
||||
if (args.Length > 0) {
|
||||
using (StreamReader r = File.OpenText (args [0]))
|
||||
s.Write (r.ReadToEnd ());
|
||||
} else {
|
||||
s.Write ("<html><body>");
|
||||
s.Write ("Hello world!");
|
||||
|
|
Loading…
Reference in a new issue