GUI/MainForm.cs
changeset 387 87093432c843
parent 386 7094d5dd924b
child 395 d1f25b504845
     1.1 --- a/GUI/MainForm.cs	Sun Oct 28 14:06:50 2012 +0000
     1.2 +++ b/GUI/MainForm.cs	Sun Oct 28 15:19:45 2012 +0000
     1.3 @@ -263,11 +263,16 @@
     1.4        fahrenheitMenuItem.Checked = !celsiusMenuItem.Checked;
     1.5  
     1.6        server = new HttpServer(root, this.settings.GetValue("listenerPort", 8085));
     1.7 +      if (server.PlatformNotSupported) {
     1.8 +        webMenuItemSeparator.Visible = false;
     1.9 +        webMenuItem.Visible = false;
    1.10 +      }
    1.11 +
    1.12        runWebServer = new UserOption("runWebServerMenuItem", false,
    1.13          runWebServerMenuItem, settings);
    1.14        runWebServer.Changed += delegate(object sender, EventArgs e) {
    1.15          if (runWebServer.Value)
    1.16 -          runWebServer.Value = server.StartHTTPListener();
    1.17 +          server.StartHTTPListener();
    1.18          else
    1.19            server.StopHTTPListener();
    1.20        };
    1.21 @@ -293,8 +298,7 @@
    1.22          computer.Close();
    1.23          SaveConfiguration();
    1.24          if (runWebServer.Value) 
    1.25 -            server.Quit();
    1.26 -
    1.27 +          server.Quit();
    1.28        };
    1.29      }
    1.30