xcube-studio / natsurainko.fluentlauncher Goto Github PK
View Code? Open in Web Editor NEWNatsurainko.FluentLauncher A Minecraft launcher designed for Windows 11
Home Page: https://fluentlauncher.natsurainko.work/
License: MIT License
Natsurainko.FluentLauncher A Minecraft launcher designed for Windows 11
Home Page: https://fluentlauncher.natsurainko.work/
License: MIT License
FluentLauncher版本:2.1.5.0
主要大意:无法启动
是游戏崩溃的问题吗:否
System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\WINDOWS\system32\信息: 用提供的模式无法找到文件。
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava() at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting() at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core) at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core) at Natsurainko.FluentLauncher.ViewModels.Pages.Home.<Launch>b__8_0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state) at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0() System.IO.FileNotFoundException System.IO.FileNotFoundException: C:\WINDOWS\system32\信息: 用提供的模式无法找到文件。 at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName) at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.<GetSuitableJava>b__6_1(String x) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Home.b__8_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\WINDOWS\system32\信息: 用提供的模式无法找到文件。
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func`2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Home.b__8_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
Modrinth官方文档:https://docs.modrinth.com/
这个 Issue 用于汇总所有与设置界面 UI 相关的问题,并跟踪开发进度。
CommunityToolkit Labs - Settings 项目中的 SettingsExpander
和 SettingsCard
还原了 Windows 11 设置页面中的 UI 布局,使用这个包可以更好的构建设置页面并简化代码。
感谢 @bsdayo 的建议
Discussion #40
由于需要升级到 .NET 7 ,并且对 UI 更改较多,我会先在单独的分支上开发,等确认表现比较稳定后再提交 PR 。
开发进度将会在这里更新。
CommunityToolkit.Labs.WinUI.SettingsControl
nuget 包CommunityToolkit.Labs.WinUI.SettingsControls
功能稳定作者我想问个问题,启动器中forge和optifine不能同时安装,以后有可能实现吗?
您的功能请求是否与问题有关?请描述
目前程序发生异常时将会直接退出,提供全局异常捕获可以帮助用户反馈问题。
注意到App.xaml.cs
里面有注释掉的相关代码,尝试改了一下已经初步实现了解决方案,主要问题如下:
e.Handled = true
,即使异常已经被捕获了,仍然会导致程序崩溃MainWindow
展示,如果MainWindow
初始化未完成会导致空引用,在全局异常处理方法里面继续引发异常描述您想要的解决方案
MainWindow
已正常创建,通过MessageDialog
展示错误信息代码在这里https://github.com/gaviny82/Natsurainko.FluentLauncher/tree/global-exception-handler
如题,假设启动器内将游戏窗口分辨率的值留空,会自动赋值整形下限(-2147483648)
视频见下
版本2.0.5
https://user-images.githubusercontent.com/85007951/190863099-3c6c8289-2eb4-40c8-a3aa-a32f3dddc422.mp4
您的功能请求是否与问题有关?请描述
否
描述您想要的解决方案
各个核心可以配置其默认选中的账户
例如我有一个核心 Hypixel
,我希望它默认选中微软账号;而当我启动用于登录第三方服务器的核心时,我希望默认选中某个外置登录账号。
描述您考虑的备选方案
-
附件
-
详细信息见#103
System.IO.FileNotFoundException: C:\Program Files\Java\jre1.8.0_311\bin\javaw.exe
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava() at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting() at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core) at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core) at Natsurainko.FluentLauncher.ViewModels.Pages.Home.<Launch>b__8_0() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state) at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0() System.IO.FileNotFoundException System.IO.FileNotFoundException: C:\Program Files\Java\jre1.8.0_311\bin\javaw.exe at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName) at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.<GetSuitableJava>b__6_1(String x) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Home.b__8_0()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\Program Files\Java\jre1.8.0_311\bin\javaw.exe
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func`2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Home.b__8_0()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
FluentLauncher版本:2.1.50
主要大意:启动游戏时弹出错误报告
是游戏崩溃的问题吗:否
title
FluentLauncher版本:latest
主要大意:文件被占用导致无法删除核心
是游戏崩溃的问题吗:否
System.IO.IOException
System.IO.IOException: The process cannot access the file 'C:\Users\迪迦\AppData\Roaming.minecraft\versions\1.18.2\1.18.2.jar_Part_0_To_2532456' because it is being used by another process.
at System.IO.FileSystem.DeleteFile(String fullPath)
at System.IO.FileInfo.Delete()
at Natsurainko.Toolkits.IO.DirectoryExtension.DeleteAllFiles(DirectoryInfo directory)
at Natsurainko.FluentCore.Extension.GameCoreExtension.Delete(IGameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Cores.Delete()
at CommunityToolkit.Mvvm.Input.RelayCommand.Execute(Object parameter)
at ABI.System.Windows.Input.ICommand.Vftbl.Do_Abi_Execute_3(IntPtr thisPtr, IntPtr parameter)
删除不了存档
请注意:一个issue仅报告一个问题。如果您有很多问题,请创建其他issues
请注意:如果您要反馈一些不重要的错误,请在讨论中发布
FluentLauncher版本:2.X.XX
主要大意:启动失败
是游戏崩溃的问题吗:是
System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\Windows\System32\信息: 用提供的模式无法找到文件。
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava() at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting() at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core) at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core) at Natsurainko.FluentLauncher.ViewModels.Pages.Cores.<>c__DisplayClass11_0.<Launch>b__0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state) at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0() System.IO.FileNotFoundException System.IO.FileNotFoundException: C:\Windows\System32\信息: 用提供的模式无法找到文件。 at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName) at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.<GetSuitableJava>b__6_1(String x) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Cores.<>c__DisplayClass11_0.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\Windows\System32\信息: 用提供的模式无法找到文件。
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func`2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Cores.<>c__DisplayClass11_0.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
请注意:一个issue仅报告一个问题。如果您有很多问题,请创建其他issues
请注意:如果您要反馈一些不重要的错误,请在讨论中发布
FluentLauncher版本:2.1.5.0
主要大意:启动器无法正常打开
是游戏崩溃的问题吗:否
如标题所言,启动器无法正常启动,而是显示一个“启动器出现错误”的窗口,并提供了日志。
System.NullReferenceException
System.NullReferenceException: Object reference not set to an instance of an object.
at Natsurainko.FluentLauncher.Components.LanguageResources.ApplyLanguage(String language)
at Natsurainko.FluentLauncher.MainWindow..ctor()
at Natsurainko.FluentLauncher.App.OnLaunched(LaunchActivatedEventArgs args)
System.NullReferenceException
System.NullReferenceException: Object reference not set to an instance of an object.
at Natsurainko.FluentLauncher.Components.LanguageResources.ApplyLanguage(String language)
at Natsurainko.FluentLauncher.MainWindow..ctor()
at Natsurainko.FluentLauncher.App.OnLaunched(LaunchActivatedEventArgs args)
System.NullReferenceException
System.NullReferenceException: Object reference not set to an instance of an object.
at Natsurainko.FluentLauncher.Components.LanguageResources.ApplyLanguage(String language)
at Natsurainko.FluentLauncher.MainWindow..ctor()
at Natsurainko.FluentLauncher.App.OnLaunched(LaunchActivatedEventArgs args)
描述您想要的解决方案
当游戏crash时能像pcl那样分析日志给出一个更加直观的崩溃原因
描述您考虑的备选方案
添加一个按钮像打开running log那样打开本次运行的crash report
第一次使用可以在启动器钟提供JAVA下载安装就好了,还有就是启动器动画是不是只有60帧,可以支持更高的帧数吗?我屏幕是144hz的,看起来卡卡的
FluentLauncher错误报告:System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\Windows\system32\信息: 用提供的模式无法找到文件。
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava() at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting() at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core) at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core) at Natsurainko.FluentLauncher.ViewModels.Pages.Home.<Launch>b__8_0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state) at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0() System.IO.FileNotFoundException System.IO.FileNotFoundException: C:\Windows\system32\信息: 用提供的模式无法找到文件。 at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName) at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.<GetSuitableJava>b__6_1(String x) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Home.b__8_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\Windows\system32\信息: 用提供的模式无法找到文件。
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func`2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Home.b__8_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
FluentLauncher版本:2.1.50
FluentLauncher版本:latest
主要大意:即使核心名称不同也无法安装相同版本的核心
是游戏崩溃的问题吗:否
应该考虑支持相同版本的安装,只要保证名字不同就行
FluentLauncher版本:2.X.XX
主要大意:出现什么问题了
是游戏崩溃的问题吗:否
转自B站评论区
https://www.bilibili.com/video/BV1AM4y1Q7Aw
确实太刺眼了
相关问题:Discussion #48
Unpackage 和新建的 WinUI 项目都没有问题,经测试发现更改 Package ID 后显示正常,怀疑是因为商店分类是游戏导致 Windows 自动开启 HDR
5
请注意:一个issue仅报告一个问题。如果您有很多问题,请创建其他issues
请注意:如果您要反馈一些不重要的错误,请在讨论中发布
FluentLauncher版本:2.1.50
主要大意:无法启动游戏
是游戏崩溃的问题吗:否
无法启动游戏
System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\Windows\system32\信息: 用提供的模式无法找到文件。
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava() at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting() at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core) at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core) at Natsurainko.FluentLauncher.ViewModels.Pages.Home.<Launch>b__8_0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state) at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0() System.IO.FileNotFoundException System.IO.FileNotFoundException: C:\Windows\system32\信息: 用提供的模式无法找到文件。 at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName) at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.<GetSuitableJava>b__6_1(String x) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Home.b__8_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\Windows\system32\信息: 用提供的模式无法找到文件。
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func`2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Home.b__8_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
这里的 FlowDirection
是刻意改成 RightToLeft 的么
似乎所有的ComboBox都是这样,是有什么设计意图么
感觉看上去很不舒服
请注意:一个 issue 仅报告一个问题。如果您有很多问题,请创建其他 issues
请注意:如果您要反馈一些不重要的问题,请在讨论中发布
您的功能请求是否与问题有关?请描述
目前的档案选择器只会为 Yggdrasil 档案显示一个“Yggdrasil”字样,在多个不同验证服务器的角色名称相同的情况下无法区分验证服务器。
如:我添加了一个 LittleSkin 的档案,又添加了一个自建皮肤站的档案,二者的角色名相同,而选择器内并未提供来源信息。
描述您想要的解决方案
为档案选择器内第三方验证档案添加一个信息以显示验证服务器信息,如“Big__Cake, Yggdrasil(LittleSkin)”。
描述您考虑的备选方案
直接将档案选择器拆分为独立的页面,并添加档案头像,当鼠标指针移动到档案上时,通过 ToolTip
控件显示详细信息,如:
验证模式:Yggdrasil
验证服务器:LittleSkin
官网
https://adoptium.net/ 下载是重定向到github所以可能访问不了或者慢 但有API和镜像
https://bell-sw.com/pages/downloads/ 界面一般 下载是网站直接提供 貌似可以直接下
https://aws.amazon.com/corretto/ 界面不太友好 能直接下 但只有jdk没jre
https://www.azul.com/downloads/?package=jdk 界面一般 下载有cdn
https://sap.github.io/SapMachine/ 界面还行 但下载是github
vscode里就这些 没列出来就是没STS或者要求注册登录
Adoptium官方API
https://api.adoptium.net/
示例: https://api.adoptium.net/v3/assets/latest/19/hotspot?architecture=x64&image_type=jre&os=windows
国内Adoptium镜像
https://mirrors.tuna.tsinghua.edu.cn/Adoptium/
https://mirror.nju.edu.cn/adoptium/
https://mirrors.sustech.edu.cn/Adoptium/
https://mirrors.ustc.edu.cn/adoptium/
可以先从API获取文件名然后拼接出镜像对应的路径 示例: https://jdk-download.gitee.io/
更新到2.1.0.0无法打开
FluentLauncher版本:2.1.30
主要大意:外置登录报错
是游戏崩溃的问题吗:否
使用外置登录时报错
严重程度:
5
如题
又是我,发现了个新问题就是修复之后闪退没了就是,版本的模组管理界面没模组了。新建游戏一个往文件夹放入多个模组后也看不见开关。没测试加入多少个模组发生的我放入的100多个模组。
描述您想要的解决方案
点击启动Minecraft后直接跳转至启动任务界面,方便进一步操作而不需要点击通知才跳转
System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\Users\CTZ\AppData\Roaming.minecraft\cache\java\java-runtime-beta\windows-x64\java-runtime-beta\bin\javaw.exe
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava() at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting() at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core) at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core) at Natsurainko.FluentLauncher.ViewModels.Pages.Home.<Launch>b__8_0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state) at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0() System.IO.FileNotFoundException System.IO.FileNotFoundException: C:\Users\CTZ\AppData\Roaming\.minecraft\cache\java\java-runtime-beta\windows-x64\java-runtime-beta\bin\javaw.exe at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName) at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.<GetSuitableJava>b__6_1(String x) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Home.b__8_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
System.IO.FileNotFoundException
System.IO.FileNotFoundException: C:\Users\CTZ\AppData\Roaming.minecraft\cache\java\java-runtime-beta\windows-x64\java-runtime-beta\bin\javaw.exe
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b__6_1(String x)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func`2 elementSelector)
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava()
at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting()
at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core)
at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core)
at Natsurainko.FluentLauncher.ViewModels.Pages.Home.b__8_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
您的功能请求是否与问题有关?请描述
目前所有与设置相关的ViewModel都继承自ObservableObject
,通过PropertyChanged
事件与反射获取需要更新的设置项。这样使得所有与设置访问有关的操作都必须和ViewModel关联,而MVVM设计模式中VM不应该直接处理与平台有关的逻辑。随着设置数量和复杂度的增加,可能在管理设置名称和层级上遇到更多问题。
描述您想要的解决方案
更新:https://github.com/gaviny82/AppSettingsManagement
因为需要使用Source Generator,稍后会发布nuget包
为了使设置的访问与管理更加方便,我设计了以下方案:
建立单例SettingsService
,包含所有的设置项与嵌套的子项
SettingsService
通过ISettingsStorage
接口与存储设置内容的数据结构交互。这里可以设置不同的实例以应对Packaged和Unpackaged模式。SettingsService
中的公开属性SettingsService
中的一个属性的值,并自动触发对应这个设置项的事件。
SettingItem
Attribute标注对应的Key,默认值和对应的数据类型转换(例如:将一个复杂对象序列化为json字符串)在与设置相关的VM中通过依赖注入SettingsService
ObservableProperty
上标注[SettingItemBinding]
,表示绑定到一个指定的设置项SettingsService
的调用,并监听对应属性被修改的事件这样也可以允许在其它与UI无关的组件中使用依赖注入,并获取部分设置的内容,并且可以监听某一项设置的改变事件。
计划实现的功能
IList
API示例
public class SettingsManagerBase : ISettingsManager
{
public event SettingChangedEventHandler? SettingsChanged;
public ISettingsStorage Storage { get; init; }
public SettingsManagerBase(ISettingsStorage storage) { }
protected T GetValue<T>(string key) where T : notnull
protected T GetValue<T>(string key, T defaultValue) where T : notnull
protected void SetValue<T>(string key, T value, ref SettingChangedEventHandler? _event) where T: notnull
}
public class SettingsManagerService : SettingsManagerBase
{
public SettingsManagerService() : base(new WindowsSettingsStorage()) { }
#region Username
[SettingItem(nameof(Username))]
public string Username // Autogenerate:
{
get => GetValue<string>(nameof(Username));
set => SetValue<string>(nameof(Username), value, ref UsernameChanged);
}
// Autogenerate:
public event SettingChangedEventHandler? UsernameChanged;
#endregion
}
在ViewModel中的绑定:
public class AccountViewModel : ObservableObject
{
// Dependency injection
SettingsManagerService SettingsManager;
[ObservableProperty]
[SettingsBinding(nameof(SettingsManager.Username))]
private string username;
}
在每个版本的模组列表中提供模组搜搜功能
@vanja-san We new Launcher will be finished almost.
We want to get RU translate.
So We ask you to help RU translate.
ThX :)
Resources.resw.TXT
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.