Skip to content

Commit 736b22b

Browse files
Content tab from Options moved to Manually Installed tab from Content form, documentation changed occordingly
1 parent e45f14f commit 736b22b

11 files changed

+126
-79
lines changed
Loading
Loading
Binary file not shown.
Binary file not shown.

Source/Documentation/Manual/start.rst

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ installation profile.
1616

1717
.. image:: images/start-activity.png
1818

19-
If not, then the next ``Download Content`` form is shown where you can download content. This form is described in the next `Content` chapter.
19+
If not, then the next ``Content`` form is shown where you can download content. This form is described in the next `Content` chapter.
2020

2121
Content
2222
=======
2323

24-
Clicking on the ``Content`` button makes the ``Download Content`` form popup (if not already there for a new empty Open Rails installation):
24+
Clicking on the ``Content`` button makes the ``Content`` form popup with the tab ``Auto Installed`` open:
2525

26-
.. image:: images/download-content-form.png
26+
.. image:: images/content-form-auto-installed.png
2727

2828
Select the route to be installed. This list will be enlarged by the OR team when suitable routes become available.
2929
However it is still possible to install routes manually as described in the next chapter.
@@ -49,8 +49,36 @@ name of one of the MSTS routes in your MSTS installation.
4949

5050
You can easily add, remove or move other content profiles and select
5151
among them (e.g. if you have any so-called ``mini-routes`` installed.).
52-
Click on the ``Options`` button and select the ``Content`` tab. See the
53-
:ref:`Content Options <options-Content>` discussed below for more instructions.
52+
53+
For this select the ``Manually Installed`` tab on the ``Content`` form:
54+
55+
.. image:: images/content-form-manually-installed.png
56+
57+
This window allows you to add, remove or modify access to content.
58+
Each profile may be a folder containing one or more routes, or an MSTS
59+
installation.
60+
Profiles located on other drives, or on a USB key, can be added even if they are
61+
not always available.
62+
63+
Click on the *Add* button, and locate the desired installation. ORTS will
64+
automatically enter a proposed name in the *Route:* window that will
65+
appear in the *Installation set:* window on the main menu form. Modify
66+
the name if desired, then click *OK* to add the new path and name to
67+
Open Rails.
68+
69+
Please do not store content or any files within the folder containing the Open Rails software.
70+
This is because the Updater operates by wiping out the contents of that folder before replacing it
71+
with a new updated version.
72+
It would be unfriendly for users to lose content that they have stored there, so
73+
attempts to add a profile folder stored there are blocked and lead to an error message.
74+
75+
To remove an entry (note that this does not remove the installation
76+
itself!) select the entry in the window, and click *Delete*, then *OK*
77+
to close the window.
78+
79+
To modify an entry, select the route to be changed. Make the necessary changes in the ``Route`` and/or ``Path`` fields.
80+
The *Browse...* button can be used to chnage the Path by browsing. Click *OK*
81+
to close the window and save the changes to OR.
5482

5583
.. _updating-or:
5684

Source/Menu/ContentForm.Designer.cs

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

Source/Menu/ContentForm.cs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public partial class ContentForm : Form
3939
{
4040
private readonly GettextResourceManager Catalog;
4141
private readonly UserSettings Settings;
42+
private readonly string BaseDocumentationUrl;
4243

4344
private readonly IDictionary<string, ContentRouteSettings.Route> AutoInstallRoutes;
4445

@@ -60,7 +61,7 @@ public partial class ContentForm : Form
6061
private bool In_dataGridViewManualInstall_SelectionChanged = false;
6162
private bool In_buttonManualInstallAdd_Click = false;
6263

63-
public ContentForm(UserSettings settings)
64+
public ContentForm(UserSettings settings, string baseDocumentationUrl)
6465
{
6566
InitializeComponent();
6667

@@ -76,6 +77,7 @@ public ContentForm(UserSettings settings)
7677
Localizer.Localize(this, Catalog);
7778

7879
Settings = settings;
80+
BaseDocumentationUrl = baseDocumentationUrl;
7981

8082
//
8183
// "Auto Installed" tab
@@ -143,6 +145,25 @@ private void tabControlContent_Selecting(object sender, TabControlCancelEventArg
143145
}
144146
}
145147

148+
private void pbContent_Click(object sender, EventArgs e)
149+
{
150+
string fileName = "";
151+
if (tabControlContent.SelectedTab == tabControlContent.TabPages["tabPageAutoInstall"])
152+
{
153+
fileName = BaseDocumentationUrl + "/start.html#content";
154+
}
155+
if (tabControlContent.SelectedTab == tabControlContent.TabPages["tabPageManuallyInstall"])
156+
{
157+
fileName = BaseDocumentationUrl + "/start.html#installation-profiles";
158+
}
159+
160+
Process.Start(new ProcessStartInfo
161+
{
162+
FileName = fileName,
163+
UseShellExecute = true
164+
});
165+
}
166+
146167
#region Auto Installed
147168
//
148169
// "Auto Installed" tab

Source/Menu/ContentForm.resx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,4 @@
117117
<resheader name="writer">
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120-
<metadata name="dgvTextBoxColumnManualInstallRoute.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
121-
<value>True</value>
122-
</metadata>
123-
<metadata name="dgvTextBoxColumnManualInstallPath.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
124-
<value>True</value>
125-
</metadata>
126-
<metadata name="dgvTextBoxColumnManualInstallRoute.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
127-
<value>True</value>
128-
</metadata>
129-
<metadata name="dgvTextBoxColumnManualInstallPath.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
130-
<value>True</value>
131-
</metadata>
132120
</root>

Source/Menu/MainForm.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ internal string RunActivityProgram
109109

110110
GettextResourceManager catalog = new GettextResourceManager("Menu");
111111

112+
public string BaseDocumentationUrl;
113+
112114
#region Main Form
113115
public MainForm()
114116
{
@@ -129,6 +131,16 @@ public MainForm()
129131
UpdateEnabled();
130132
UpdateManager = new UpdateManager(System.IO.Path.GetDirectoryName(Application.ExecutablePath), Application.ProductName, VersionInfo.VersionOrBuild);
131133
ElevationIcon = new Icon(SystemIcons.Shield, SystemInformation.SmallIconSize).ToBitmap();
134+
135+
BaseDocumentationUrl = "https://open-rails.readthedocs.io/en/latest";
136+
if (VersionInfo.Version.Length > 0)
137+
{
138+
if (VersionInfo.Version.StartsWith("T") || VersionInfo.Version.StartsWith("U"))
139+
{
140+
BaseDocumentationUrl = "https://open-rails.readthedocs.io/en/unstable";
141+
}
142+
}
143+
132144
}
133145

134146
void MainForm_Shown(object sender, EventArgs e)
@@ -561,7 +573,7 @@ void buttonOptions_Click(object sender, EventArgs e)
561573
{
562574
SaveOptions();
563575

564-
using (var form = new OptionsForm(Settings, UpdateManager))
576+
using (var form = new OptionsForm(Settings, UpdateManager, BaseDocumentationUrl))
565577
{
566578
switch (form.ShowDialog(this))
567579
{
@@ -578,7 +590,7 @@ void buttonOptions_Click(object sender, EventArgs e)
578590

579591
void buttonDownloadContent_Click(object sender, EventArgs e)
580592
{
581-
using (var form = new ContentForm(Settings))
593+
using (var form = new ContentForm(Settings, BaseDocumentationUrl))
582594
{
583595
form.ShowDialog(this);
584596
}
@@ -757,7 +769,7 @@ public void LoadFolderList()
757769

758770
if (!initialized && Folders.Count == 0)
759771
{
760-
using (var form = new ContentForm(Settings))
772+
using (var form = new ContentForm(Settings, BaseDocumentationUrl))
761773
{
762774
switch (form.ShowDialog(this))
763775
{

Source/Menu/Options.Designer.cs

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

0 commit comments

Comments
 (0)