ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/HostUpdateSharp/HostUpdateSharp.cs
(Generate patch)

Comparing HostUpdateSharp/HostUpdateSharp.cs (file contents):
Revision 96 by Douglas Thrift, 2004-03-02T00:26:19-08:00 vs.
Revision 98 by Douglas Thrift, 2004-03-02T01:17:58-08:00

# Line 8 | Line 8 | using System;
8   using System.IO;
9   using System.Net;
10   using System.Text;
11 + #if !_FreeBSD_
12 + using System.Windows.Forms;
13 + #endif
14  
15   public class HostUpdateSharp
16   {
17          public static void Main(string[] args)
18          {
19 +                foreach (string arg in args)
20 +                {
21 +                        switch (arg)
22 +                        {
23 +                        case "-D":
24 +                                debug = true;
25 +                                break;
26 +                        }
27 +                }
28 +
29                  try
30                  {
31                          new HostUpdateSharp();
# Line 55 | Line 68 | public class HostUpdateSharp
68                  StreamReader content = new StreamReader(response.GetResponseStream(),
69                          Encoding.ASCII);
70  
71 <                Console.Write(content.ReadToEnd());
71 > #if _FreeBSD_
72 >                if (debug) Console.Write(content.ReadToEnd());
73 > #else
74 >                if (debug) MessageBox.Show(content.ReadToEnd(), "Host Update Sharp",
75 >                        MessageBoxButtons.OK, MessageBoxIcon.Information);
76 > #endif
77 >
78                  content.Close();
79          }
80 +        private static bool debug = false;
81   #if _FreeBSD_
82          private string platform() { return "FreeBSD 4.9-STABLE i386"; }
83   #else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines