Skip to content

Commit

Permalink
setting default update channel
Browse files Browse the repository at this point in the history
fixing minor issues
  • Loading branch information
perpetualKid committed Sep 17, 2020
1 parent 3c21ac7 commit 570e4cd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/Menu/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private async void MainForm_Shown(object sender, EventArgs e)
if (!initialized)
{
initTasks.Add(CheckForUpdateAsync());
initTasks.Add(Task.Run(LoadToolsAndDocuments));
LoadToolsAndDocuments();

comboBoxStartSeason.DataSourceFromEnumIndex<SeasonType>(commonCatalog);
comboBoxStartWeather.DataSourceFromEnumIndex<WeatherType>(commonCatalog);
Expand Down
2 changes: 1 addition & 1 deletion Source/Menu/Options.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/Orts.Settings/Store/SettingsStoreLocalIni.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected override object GetSettingValue(string name, Type expectedType)

if (expectedType.IsEnum)
{
return Enum.Parse(expectedType, userValue);
return Enum.Parse(expectedType, userValue, true);
}
else
// Convert whatever we're left with into the expected type.
Expand Down
4 changes: 3 additions & 1 deletion Source/Orts.Settings/Store/SettingsStoreRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

using Microsoft.Win32;

using Orts.Common;

namespace Orts.Settings.Store
{
/// <summary>
Expand Down Expand Up @@ -72,7 +74,7 @@ protected override object GetSettingValue(string name, Type expectedType)
return intValues.Split(',').Select(s => int.Parse(s, CultureInfo.InvariantCulture)).ToArray();

if (expectedType.IsEnum && userValue is string enumValue)
return Enum.Parse(expectedType, enumValue);
return Enum.Parse(expectedType, enumValue, true);

// Convert whatever we're left with into the expected type.
return Convert.ChangeType(userValue, expectedType, CultureInfo.InvariantCulture);
Expand Down
2 changes: 1 addition & 1 deletion Source/Orts.Settings/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static UserSettings()
#region update settings
[Default((int)Orts.Common.UpdateCheckFrequency.Always)]
public int UpdateCheckFrequency { get; set; }
[Default("")]
[Default("rc")]
public string UpdateChannel { get; set; }
[Default("https://ultimaterails.blob.core.windows.net/builds/")]
public string UpdateSource { get; set; }
Expand Down

0 comments on commit 570e4cd

Please sign in to comment.