diff --git a/PCL.Neo.Core/Models/Minecraft/Mod/ModInfoReader.cs b/PCL.Neo.Core/Models/Minecraft/Mod/ModInfoReader.cs index 9a258baa..849f0997 100644 --- a/PCL.Neo.Core/Models/Minecraft/Mod/ModInfoReader.cs +++ b/PCL.Neo.Core/Models/Minecraft/Mod/ModInfoReader.cs @@ -100,7 +100,7 @@ public static async Task> GetModInfo(string modDir) mods.Add(modInfo); break; case ModInfoType.MetaInf: - var tomlContent = Toml.ToModel(rawContent).Mods.First(); + var tomlContent = TomlSerializer.Deserialize(rawContent)!.Mods.First(); // copy mod icon if (!string.IsNullOrEmpty(tomlContent.LogoFile)) diff --git a/PCL.Neo.Core/PCL.Neo.Core.csproj b/PCL.Neo.Core/PCL.Neo.Core.csproj index 92f3a6b7..dd0a1ebd 100644 --- a/PCL.Neo.Core/PCL.Neo.Core.csproj +++ b/PCL.Neo.Core/PCL.Neo.Core.csproj @@ -8,19 +8,19 @@ - + - - - + + + - + - + diff --git a/PCL.Neo/App.axaml.cs b/PCL.Neo/App.axaml.cs index 46970067..f75d4fd6 100644 --- a/PCL.Neo/App.axaml.cs +++ b/PCL.Neo/App.axaml.cs @@ -57,9 +57,6 @@ public override void OnFrameworkInitializationCompleted() Task.Run(Ioc.Default.GetRequiredService().JavaListInitAsync); if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) { - // Avoid duplicate validations from both Avalonia and the CommunityToolkit. - // More info: https://docs.avaloniaui.net/docs/guides/development-guides/data-validation#manage-validationplugins - DisableAvaloniaDataAnnotationValidation(); desktop.MainWindow = new MainWindow { DataContext = vm }; // 由于导航改成了异步方法,在构造函数中无法正常导向首页,需要在此处导向 Ioc.Default.GetRequiredService().GoToAsync() @@ -68,17 +65,4 @@ public override void OnFrameworkInitializationCompleted() base.OnFrameworkInitializationCompleted(); } - - private void DisableAvaloniaDataAnnotationValidation() - { - // Get an array of plugins to remove - var dataValidationPluginsToRemove = - BindingPlugins.DataValidators.OfType().ToArray(); - - // remove each entry found - foreach (var plugin in dataValidationPluginsToRemove) - { - BindingPlugins.DataValidators.Remove(plugin); - } - } } diff --git a/PCL.Neo/PCL.Neo.csproj b/PCL.Neo/PCL.Neo.csproj index f44c0819..cbaa9aa1 100644 --- a/PCL.Neo/PCL.Neo.csproj +++ b/PCL.Neo/PCL.Neo.csproj @@ -3,10 +3,8 @@ WinExe net10.0 enable - true app.manifest Assets/Icon.ico - true PCL.Neo PCL.Neo github.com/PCL-Community/PCL.Neo @@ -33,24 +31,24 @@ - - - - - - - - None - All - + + + + - - + + - + - + + + + + + + diff --git a/PCL.Neo/Program.cs b/PCL.Neo/Program.cs index 59dddbb4..5722d85e 100644 --- a/PCL.Neo/Program.cs +++ b/PCL.Neo/Program.cs @@ -25,6 +25,9 @@ public static AppBuilder BuildAvaloniaApp() { return AppBuilder.Configure() .UsePlatformDetect() +#if DEBUG + .WithDeveloperTools() +#endif .WithInterFont() .LogToTrace() .With(() => new FontManagerOptions diff --git a/PCL.Neo/Views/MainWindow.axaml b/PCL.Neo/Views/MainWindow.axaml index 474ec4f6..1cc3aaf1 100644 --- a/PCL.Neo/Views/MainWindow.axaml +++ b/PCL.Neo/Views/MainWindow.axaml @@ -3,7 +3,7 @@ Height="500" MinHeight="470" MinWidth="810" - SystemDecorations="None" + WindowDecorations="None" Title="PCL.Neo" TransparencyLevelHint="Transparent" Width="850" diff --git a/PCL.Neo/Views/MainWindow.axaml.cs b/PCL.Neo/Views/MainWindow.axaml.cs index cd9b355f..54d0fa3e 100644 --- a/PCL.Neo/Views/MainWindow.axaml.cs +++ b/PCL.Neo/Views/MainWindow.axaml.cs @@ -8,12 +8,12 @@ using PCL.Neo.Animations.Easings; using PCL.Neo.Helpers; using PCL.Neo.Messages; -using PCL.Neo.Services; using System; using System.Numerics; using System.Runtime.InteropServices; using System.Threading.Tasks; using CubicEaseOut = Avalonia.Animation.Easings.CubicEaseOut; +using NavigationType = PCL.Neo.Services.NavigationType; namespace PCL.Neo.Views; diff --git a/global.json b/global.json index f4fd3857..dc43140b 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,6 @@ { "sdk": { - "version": "9.0.0", - "rollForward": "latestMajor", - "allowPrerelease": true + "version": "10.0.0", + "rollForward": "latestMajor" } } \ No newline at end of file