Skip to content

Commit f3b41bb

Browse files
author
Chris Jakeman
committed
Adds action to open website page
1 parent 2ed071e commit f3b41bb

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

Source/Documentation/Use this folder to store.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
In Source\Documentation\ to store source for documents useful in running Open Rails.
2+
This applies to core Open Rails and also to non-core (or "contributed" programs.
3+
24
They should be MS Office or OpenOffice format and will be processed to PDF format which is distributed as part of the installation and available to users in the drop-down Menu > Documents
35

46
Other documents should be stored in Source\Documentation\Online and these are all available on the website via a link in the drop-down.

Source/Menu/MainForm.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ orderby tool.Text
243243
var docs = new List<ToolStripItem>();
244244
var dir = Directory.GetCurrentDirectory();
245245
var path = dir + @"\Documentation\";
246+
246247
if (Directory.Exists(path))
247248
{
248249
// Load English documents
@@ -259,7 +260,13 @@ orderby tool.Text
259260
LoadDocuments(docs, codePath, code);
260261
}
261262
}
262-
else buttonDocuments.Enabled = false;
263+
264+
var item = new ToolStripMenuItem($"Online documents (opens browser)", null, (object sender2, EventArgs e2) =>
265+
{
266+
Process.Start("https://www.openrails.org/learn/docs-list/");
267+
}
268+
);
269+
contextMenuStripDocuments.Items.Add(item);
263270

264271
NotificationManager = new NotificationManager(this, this.Resources, UpdateManager, Settings, panelDetails);
265272
}

0 commit comments

Comments
 (0)