Skip to content

Commit 0d217a6

Browse files
author
Chris Jakeman
committed
Moves WebServerPort control to System tab
1 parent e077d01 commit 0d217a6

File tree

4 files changed

+111
-82
lines changed

4 files changed

+111
-82
lines changed

Source/Documentation/Manual/options.rst

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -117,31 +117,6 @@ Disable TCS scripts
117117
This option disables the train control system scripts for locomotives where
118118
these have been implemented.
119119

120-
.. _options-web-server-port:
121-
122-
Web server port
123-
-----------------
124-
125-
The web server can be accessed from a browser on the local machine at
126-
``http://localhost:<port>``, where ``<port>`` is the specified port number.
127-
Change the default value of 2150 if it conflicts with other services.
128-
129-
If you `open
130-
<https://www.howtogeek.com/394735/how-do-i-open-a-port-on-windows-firewall/>`_
131-
the web server port (just granting RunActivity.exe an exemption is not
132-
sufficient) in Windows Firewall, the server can also be accessed from a device
133-
on the local network, such as a smartphone, tablet or another PC, using your
134-
system's `IP address
135-
<https://support.microsoft.com/en-us/windows/find-your-ip-address-f21a9bbc-c582-55cd-35e0-73431160a1b9>`_.
136-
E.g.: If your Open Rails PC is at IP address 192.168.0.99, browse to
137-
``http://192.168.0.99:<port>``, where ``<port>`` is the specified port number.
138-
139-
:ref:`Sample web pages <sample-web-pages>` are included in the Open Rails
140-
installation and the browser will show a menu of sample pages.
141-
142-
As well as a web browser, data from the web server can also be fetched by any
143-
program which can make a web request, such as C# or Python, using the
144-
:ref:`Application Programming Interface <web-server-api>` (API).
145120

146121
Overspeed Monitor
147122
-----------------
@@ -559,6 +534,33 @@ Once the game has started, you can toggle the confirmations on and off
559534
by pressing ``<Ctrl+Alt+F10>``.
560535

561536

537+
.. _options-web-server-port:
538+
539+
Web server port
540+
-----------------
541+
542+
The web server can be accessed from a browser on the local machine at
543+
``http://localhost:<port>``, where ``<port>`` is the specified port number.
544+
Change the default value of 2150 if it conflicts with other services.
545+
546+
If you `open
547+
<https://www.howtogeek.com/394735/how-do-i-open-a-port-on-windows-firewall/>`_
548+
the web server port (just granting RunActivity.exe an exemption is not
549+
sufficient) in Windows Firewall, the server can also be accessed from a device
550+
on the local network, such as a smartphone, tablet or another PC, using your
551+
system's `IP address
552+
<https://support.microsoft.com/en-us/windows/find-your-ip-address-f21a9bbc-c582-55cd-35e0-73431160a1b9>`_.
553+
E.g.: If your Open Rails PC is at IP address 192.168.0.99, browse to
554+
``http://192.168.0.99:2150``, where ``2150`` is the specified port number.
555+
556+
:ref:`Sample web pages <sample-web-pages>` are included in the Open Rails
557+
installation and the browser will show a menu of sample pages.
558+
559+
As well as a web browser, data from the web server can also be fetched by any
560+
program which can make a web request, such as C# or Python, using the
561+
:ref:`Application Programming Interface <web-server-api>` (API).
562+
563+
562564

563565
.. _options-experimental:
564566

Source/Menu/Options.Designer.cs

Lines changed: 76 additions & 57 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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,7 @@ private void InitializeHelpIcons()
834834
(pbWindowed, new Control[] { checkWindowed, labelWindowSize, comboWindowSize }),
835835
(pbWindowGlass, new[] { checkWindowGlass }),
836836
(pbControlConfirmations, new[] { checkControlConfirmations }),
837+
(pbWebServerPort, new Control[] { labelWebServerPort }),
837838
};
838839
foreach ((PictureBox pb, Control[] controls) in helpIconControls)
839840
{
@@ -907,6 +908,10 @@ private void HelpIcon_Click(object sender, EventArgs _)
907908
pbControlConfirmations,
908909
baseUrl + "/options.html#control-confirmations"
909910
},
911+
{
912+
pbWebServerPort,
913+
baseUrl + "/options.html#web-server-port"
914+
},
910915
};
911916
if (urls.TryGetValue(sender, out var url))
912917
{

Source/Menu/Options.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,7 @@
123123
<metadata name="bindingSourceContent.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124124
<value>114, 17</value>
125125
</metadata>
126+
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
127+
<value>17, 17</value>
128+
</metadata>
126129
</root>

0 commit comments

Comments
 (0)