Skip to content

Commit

Permalink
Automatic merge of T1.5.1-1435-ge5b84141d and 15 pull requests
Browse files Browse the repository at this point in the history
- Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH
- Pull request #961 at 8a9c8f9: Improvements for Power Supplies
- Pull request #981 at 1c53db2: Multiple type trainset lightglows
- Pull request #996 at 2fcbcde: Replace dynamic brakes by engine brakes at low speeds
- Pull request #1009 at 80172b8: Fix: TrainCarViewer overlaps when display size changed
- Pull request #1010 at 6a1060f: Fix: TrainDrivingInfo window width not stable.
- Pull request #1012 at 33f692f: doc:adds 3 news items to Manual
- Pull request #1015 at 266e9ca: Enhancements for EP brakes
- Pull request #1017 at ef3bebb: Refactor namespaces in Launcher
- Pull request #1018 at 620be18: Refactor namespaces in Menu
- Pull request #900 at c27f32d: DMI updates
- Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
- Pull request #896 at f1681df: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains
- Pull request #1003 at c734592: Clean up logging during loading #or-std-log
- Pull request #1016 at 5a94c4e: Route all logging via Trace #or-std-log
  • Loading branch information
openrails-bot committed Dec 24, 2024
Show file tree
Hide file tree
Showing 38 changed files with 608 additions and 1,367 deletions.
8 changes: 1 addition & 7 deletions Source/Contrib/DataCollector/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Program
static void Main(string[] args)
{
if (args.Contains("/system", StringComparer.OrdinalIgnoreCase))
CollectSystem();
SystemInfo.WriteSystemDetails(Console.Out);
else if (args.Contains("/tile-terrtex", StringComparer.OrdinalIgnoreCase))
CollectTileTerrtex(args);
else
Expand All @@ -53,12 +53,6 @@ static void ShowHelp()
Console.WriteLine(" /help Show help and usage information");
}

static void CollectSystem()
{
Console.Error.WriteLine("Collecting information...");
SystemInfo.WriteSystemDetails(Console.Out);
}

struct TileTerrtexDirectory
{
public string Path;
Expand Down
2 changes: 1 addition & 1 deletion Source/Contrib/SimulatorTester/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// along with Open Rails. If not, see <http://www.gnu.org/licenses/>.

using System.Collections.Generic;
using ORTS.Common;
using ORTS.Settings;

namespace SimulatorTester
{
Expand Down
4 changes: 2 additions & 2 deletions Source/Menu/ContentForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Source/Menu/ContentForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
using System.Threading.Tasks;
using GNU.Gettext.WinForms;

namespace ORTS
namespace Menu
{
public partial class ContentForm : Form
{
Expand Down Expand Up @@ -1120,25 +1120,25 @@ private int determineSelectedIndex(ComboBox comboBox, string compareWith)
switch (classOfItem)
{
case "Folder":
comboboxName = ((Menu.Folder)comboBox.Items[index]).Name;
comboboxName = ((ORTS.Menu.Folder)comboBox.Items[index]).Name;
break;
case "Route":
comboboxName = ((Menu.Route)comboBox.Items[index]).Name;
comboboxName = ((ORTS.Menu.Route)comboBox.Items[index]).Name;
break;
case "DefaultExploreActivity":
comboboxName = ((Menu.Activity)comboBox.Items[index]).Name;
comboboxName = ((ORTS.Menu.Activity)comboBox.Items[index]).Name;
break;
case "Locomotive":
comboboxName = ((Menu.Locomotive)comboBox.Items[index]).Name;
comboboxName = ((ORTS.Menu.Locomotive)comboBox.Items[index]).Name;
break;
case "Consist":
comboboxName = ((Menu.Consist)comboBox.Items[index]).Name;
comboboxName = ((ORTS.Menu.Consist)comboBox.Items[index]).Name;
break;
case "String":
comboboxName = (string)comboBox.Items[index];
break;
case "Path":
comboboxName = ((Menu.Path)comboBox.Items[index]).End;
comboboxName = ((ORTS.Menu.Path)comboBox.Items[index]).End;
break;
case "KeyedComboBoxItem":
comboboxName = ((MainForm.KeyedComboBoxItem)comboBox.Items[index]).Value;
Expand Down
2 changes: 1 addition & 1 deletion Source/Menu/ImportExportSaveForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Source/Menu/ImportExportSaveForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
using GNU.Gettext.WinForms;
using ORTS.Settings;

namespace ORTS
namespace Menu
{
public partial class ImportExportSaveForm : Form
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Menu/KeyInputControl.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Source/Menu/KeyInputControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
using System.Windows.Forms;
using ORTS.Settings;

namespace ORTS
namespace Menu
{
/// <summary>
/// A control for viewing and altering keyboard input settings, in combination with <see cref="KeyInputEditControl"/>.
Expand Down
2 changes: 1 addition & 1 deletion Source/Menu/KeyInputEditControl.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Source/Menu/KeyInputEditControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
using ORTS.Settings;
using Xna = Microsoft.Xna.Framework.Input;

namespace ORTS
namespace Menu
{
/// <summary>
/// A form used to edit keyboard input settings, in combination with <see cref="KeyInputControl"/>.
Expand Down
6 changes: 3 additions & 3 deletions Source/Menu/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 5 additions & 35 deletions Source/Menu/MainForm.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COPYRIGHT 2009 - 2024 by the Open Rails project.
// COPYRIGHT 2009, 2010, 2011, 2012, 2013, 2014, 2015 by the Open Rails project.
//
// This file is part of Open Rails.
//
Expand Down Expand Up @@ -27,6 +27,7 @@
using System.Windows.Forms;
using GNU.Gettext;
using GNU.Gettext.WinForms;
using Menu.Notifications;
using Orts.Formats.OR;
using ORTS.Common;
using ORTS.Menu;
Expand All @@ -35,7 +36,7 @@
using Activity = ORTS.Menu.Activity;
using Path = ORTS.Menu.Path;

namespace ORTS
namespace Menu
{
public partial class MainForm : Form
{
Expand All @@ -55,7 +56,6 @@ public enum UserAction

bool Initialized;
UserSettings Settings;
TelemetryManager TelemetryManager;
List<Folder> Folders = new List<Folder>();
public List<Route> Routes = new List<Route>();
List<Activity> Activities = new List<Activity>();
Expand Down Expand Up @@ -149,7 +149,6 @@ void MainForm_Shown(object sender, EventArgs e)
{
var options = Environment.GetCommandLineArgs().Where(a => (a.StartsWith("-") || a.StartsWith("/"))).Select(a => a.Substring(1));
Settings = new UserSettings(options);
TelemetryManager = new TelemetryManager(Settings.Telemetry);

Cursor = Cursors.Default;

Expand Down Expand Up @@ -267,7 +266,6 @@ orderby tool.Text
ShowTimetableEnvironment();

CheckForUpdate();
CheckForTelemetry();

if (!Initialized)
{
Expand Down Expand Up @@ -347,21 +345,6 @@ public virtual void OnCheckUpdatesAgain(EventArgs e)
CheckForUpdate();
}

void CheckForTelemetry()
{
// DO NOT await this call as we want it to run in the background
_ = TelemetryManager.SubmitIfDue(TelemetryType.System, () => new
{
SystemInfo.Application,
SystemInfo.Runtime,
SystemInfo.OperatingSystem,
SystemInfo.InstalledMemoryMB,
SystemInfo.CPUs,
SystemInfo.GPUs,
SystemInfo.Direct3DFeatureLevels
});
}

void LoadLanguage()
{
if (Settings.Language.Length > 0)
Expand Down Expand Up @@ -560,15 +543,10 @@ void testingToolStripMenuItem_Click(object sender, EventArgs e)
}

void buttonOptions_Click(object sender, EventArgs e)
{
ShowOptionsDialog();
}

public void ShowOptionsDialog()
{
SaveOptions();

using (var form = new OptionsForm(Settings, UpdateManager, TelemetryManager, BaseDocumentationUrl))
using (var form = new OptionsForm(Settings, UpdateManager, BaseDocumentationUrl))
{
switch (form.ShowDialog(this))
{
Expand All @@ -582,15 +560,7 @@ public void ShowOptionsDialog()
}
}
}

public void ShowTelemetryDialog()
{
using (var telemetryForm = new TelemetryForm(TelemetryManager))
{
telemetryForm.ShowDialog(this);
}
}


void buttonDownloadContent_Click(object sender, EventArgs e)
{
using (var form = new ContentForm(Settings, BaseDocumentationUrl))
Expand Down
1 change: 0 additions & 1 deletion Source/Menu/Menu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<TargetFramework Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == ''">net472</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>ORTS</RootNamespace>
<ApplicationIcon>..\ORTS.ico</ApplicationIcon>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
Expand Down
Loading

0 comments on commit 266c347

Please sign in to comment.