fix: 移除重复的注册表自启逻辑,统一由 AutoStartManager 管理开机启动#118
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
该 PR 旨在移除重复的“注册表开机自启”设置逻辑,避免同时存在多套实现,并将自启命令/命名等公共部分统一复用 AutoStartManager 中的常量与构建逻辑,以降低维护成本。
Changes:
- 移除
App.SetAutoStart(bool)以及控制面板保存设置时对该方法的调用,避免重复写入 Run 注册表项 - 在
ControlPanelWindow.ApplyAutoStartSettings()中整理注册表 Run 与计划任务的自启配置流程(使用AutoStartManager的 Run 名称/命令与任务名称) - 以
using声明方式简化注册表 Key 的生命周期管理并调整相关分支结构
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/ControlPanelWindow.xaml.cs | 移除对 App.SetAutoStart 的调用,并在面板侧统一应用自启策略(注册表 Run / 计划任务) |
| src/App.xaml.cs | 删除重复的 SetAutoStart 注册表自启实现,避免多处来源导致行为不一致 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DoomVoss
approved these changes
Jun 30, 2026
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.
No description provided.