- tweak: a little bit of repair and tweaks
This commit is contained in:
@@ -2,8 +2,8 @@ using System.Collections.Generic;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Nebula.Launcher.Models;
|
using Nebula.Launcher.Models;
|
||||||
using Nebula.Launcher.Models.Auth;
|
using Nebula.Launcher.Models.Auth;
|
||||||
|
using Nebula.Shared.ConfigMigrations;
|
||||||
using Nebula.Shared.Services;
|
using Nebula.Shared.Services;
|
||||||
using Nebula.Shared.Services.ConfigMigrations;
|
|
||||||
|
|
||||||
namespace Nebula.Launcher;
|
namespace Nebula.Launcher;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using Nebula.Shared.Services;
|
|||||||
namespace Nebula.Launcher.ProcessHelper;
|
namespace Nebula.Launcher.ProcessHelper;
|
||||||
|
|
||||||
[ServiceRegister]
|
[ServiceRegister]
|
||||||
public sealed class GameRunnerPreparer(IServiceProvider provider, ContentService contentService, EngineService engineService, DebugService debugService)
|
public sealed class GameRunnerPreparer(IServiceProvider provider, ContentService contentService, EngineService engineService)
|
||||||
{
|
{
|
||||||
public async Task<ProcessRunHandler<GameProcessStartInfoProvider>> GetGameProcessStartInfoProvider(RobustUrl address, ILoadingHandler loadingHandler, CancellationToken cancellationToken = default)
|
public async Task<ProcessRunHandler<GameProcessStartInfoProvider>> GetGameProcessStartInfoProvider(RobustUrl address, ILoadingHandler loadingHandler, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ namespace Nebula.Launcher.Services;
|
|||||||
public partial class LocalisationService
|
public partial class LocalisationService
|
||||||
{
|
{
|
||||||
[GenerateProperty] private ConfigurationService ConfigurationService { get; }
|
[GenerateProperty] private ConfigurationService ConfigurationService { get; }
|
||||||
|
[GenerateProperty] private DebugService DebugService { get; }
|
||||||
|
|
||||||
private CultureInfo _currentCultureInfo = CultureInfo.CurrentCulture;
|
private CultureInfo _currentCultureInfo = CultureInfo.CurrentCulture;
|
||||||
private static MessageContext? _currentMessageContext;
|
private static MessageContext? _currentMessageContext;
|
||||||
|
|
||||||
@@ -42,6 +43,7 @@ public partial class LocalisationService
|
|||||||
|
|
||||||
_currentMessageContext = mc;
|
_currentMessageContext = mc;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
DebugService.GetLogger("localisationService").Error(e);
|
||||||
LoadLanguage(CultureInfo.GetCultureInfo("en-US"));
|
LoadLanguage(CultureInfo.GetCultureInfo("en-US"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using System.IO;
|
|||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
@@ -195,7 +194,7 @@ public sealed class ComplexUnitConfigControl : Border, IConfigControl
|
|||||||
|
|
||||||
var propValue = propInfo.GetValue(value);
|
var propValue = propInfo.GetValue(value);
|
||||||
|
|
||||||
var control = ConfigControlHelper.GetConfigControl(propInfo.Name, propValue);
|
var control = ConfigControlHelper.GetConfigControl(propInfo.Name, propValue!);
|
||||||
|
|
||||||
((Control)control).Margin = new Thickness(5);
|
((Control)control).Margin = new Thickness(5);
|
||||||
_panel.Children.Add((Control)control);
|
_panel.Children.Add((Control)control);
|
||||||
@@ -211,7 +210,7 @@ public sealed class ComplexUnitConfigControl : Border, IConfigControl
|
|||||||
fieldInfo.SetValue(obj, configControl.GetValue());
|
fieldInfo.SetValue(obj, configControl.GetValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
return obj;
|
return obj!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Nebula.Shared;
|
using Nebula.Shared;
|
||||||
using Nebula.Shared.Services;
|
|
||||||
|
|
||||||
namespace Nebula.Runner;
|
namespace Nebula.Runner;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Nebula.Shared.Models;
|
using Nebula.Shared.Models;
|
||||||
|
using Nebula.Shared.Services;
|
||||||
|
|
||||||
namespace Nebula.Shared.Services.ConfigMigrations;
|
namespace Nebula.Shared.ConfigMigrations;
|
||||||
|
|
||||||
public class ProfileMigrationV2(string oldName, string newName)
|
public class ProfileMigrationV2(string oldName, string newName)
|
||||||
: BaseConfigurationMigration<ProfileAuthCredentialsV2[], AuthTokenCredentials[]>(oldName, newName)
|
: BaseConfigurationMigration<ProfileAuthCredentialsV2[], AuthTokenCredentials[]>(oldName, newName)
|
||||||
Reference in New Issue
Block a user