修复强调色注册表写入异常,并为悬浮窗动作添加可恢复支持与开关式 UI#77
Open
Programmer-MrWang wants to merge 3 commits into
Open
Conversation
Owner
Author
|
note: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
RegistryValueKind.DWord不匹配导致的System.ArgumentException崩溃问题。LoadTemporaryClassPlanAction)来保存并恢复触发前的快照。Description
Actions/SwitchSystemAccentColorAction.cs中将写入注册表的 DWORD 值从uint改为unchecked((int)...),确保传入RegistryKey.SetValue的对象类型与RegistryValueKind.DWord匹配。Actions/ShowFloatingWindowAction.cs中新增private static readonly ConcurrentDictionary<Guid,bool> PreviousStates,在OnInvoke()中当IsRevertable为真时按ActionSet.Guid记录触发前的ShowFloatingWindow状态,并实现OnRevert()从快照恢复该状态并调用_floatingWindowService.UpdateWindowState()。Controls/ShowFloatingWindowSettingsControl.cs中将CheckBox替换为ToggleSwitch,并将绑定从ToggleButton.IsCheckedProperty更新为ToggleSwitch.IsCheckedProperty,同时将显示文本从Content改为Header。using System.Collections.Concurrent;用于线程安全的快照存储,修改仅限上述三个文件。Testing
dotnet build SystemTools.csproj -v minimal以构建项目,但在当前环境中失败,错误为/bin/bash: dotnet: command not found,因此未能在容器内完成编译验证。Codex Task