Skip to content

Commit ea11f73

Browse files
author
Chris Jakeman
committed
Removes web-server option.
Now always available.
1 parent 0dc5a2c commit ea11f73

File tree

5 files changed

+5
-51
lines changed

5 files changed

+5
-51
lines changed

Source/Documentation/Manual/options.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,12 @@ Disable TCS scripts
168168
This option disables the train control system scripts for locomotives where
169169
these have been implemented.
170170

171-
Enable web server
171+
Web server port
172172
-----------------
173173

174-
This option enables an internal web server that can be used to display game and
175-
train status information in a web browser, intended for use on secondary screens.
176-
177-
When activated, the server can be accessed from a browser on the local machine at
174+
The web server can be accessed from a browser on the local machine at
178175
``http://localhost:<port>``, where ``<port>`` is the specified port number.
176+
Change the default value of 2150 if it conflicts with other services.
179177

180178
If you `open
181179
<https://www.howtogeek.com/394735/how-do-i-open-a-port-on-windows-firewall/>`_

Source/Menu/Options.Designer.cs

Lines changed: 2 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/Menu/Options.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, bool init
152152
comboPressureUnit.Text = Settings.PressureUnit;
153153
comboOtherUnits.Text = settings.Units;
154154
checkDisableTCSScripts.Checked = Settings.DisableTCSScripts;
155-
checkEnableWebServer.Checked = Settings.WebServer;
156155
numericWebServerPort.Value = Settings.WebServerPort;
157156

158157
// Audio tab
@@ -446,7 +445,6 @@ void buttonOK_Click(object sender, EventArgs e)
446445
Settings.PressureUnit = comboPressureUnit.SelectedValue.ToString();
447446
Settings.Units = comboOtherUnits.SelectedValue.ToString();
448447
Settings.DisableTCSScripts = checkDisableTCSScripts.Checked;
449-
Settings.WebServer = checkEnableWebServer.Checked;
450448

451449
// Audio tab
452450
Settings.MSTSBINSound = checkMSTSBINSound.Checked;
@@ -847,7 +845,6 @@ private void InitializeHelpIcons()
847845
(pbPressureUnit, new Control[] { labelPressureUnit, comboPressureUnit }),
848846
(pbOtherUnits, new Control[] { labelOtherUnits, comboOtherUnits }),
849847
(pbDisableTcsScripts, new[] { checkDisableTCSScripts }),
850-
(pbEnableWebServer, new[] { checkEnableWebServer }),
851848
(pbOverspeedMonitor, new[] { checkOverspeedMonitor }),
852849
};
853850
foreach ((PictureBox pb, Control[] controls) in helpIconControls)
@@ -914,10 +911,6 @@ private void HelpIcon_Click(object sender, EventArgs _)
914911
pbDisableTcsScripts,
915912
baseUrl + "/options.html#disable-tcs-scripts"
916913
},
917-
{
918-
pbEnableWebServer,
919-
baseUrl + "/options.html#enable-web-server"
920-
},
921914
{
922915
pbOverspeedMonitor,
923916
baseUrl + "/options.html#overspeed-monitor"

Source/ORTS.Settings/UserSettings.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ public enum DirectXFeature
152152
public bool IsModeActivity { get; set; } // false indicates Timetable mode
153153

154154
// General settings:
155-
156-
[Default(false)]
157-
public bool WebServer { get; set; }
158155
[Default(2150)]
159156
public int WebServerPort { get; set; }
160157

Source/RunActivity/Viewer3D/Processes/WebServerProcess.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ void WebServerThread()
6060
{
6161
Profiler.SetThread();
6262
Game.SetThreadLanguage();
63-
if (!Game.Settings.WebServer)
64-
return;
6563

6664
string myWebContentPath = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "Content\\Web");
6765
EndPointManager.UseIpv6 = true;

0 commit comments

Comments
 (0)