Skip to content

fix: 移除重复的注册表自启逻辑,统一由 AutoStartManager 管理开机启动#118

Merged
DoomVoss merged 2 commits into
DoomVoss:mainfrom
ABA2396:fix/AutoStart
Jun 30, 2026
Merged

fix: 移除重复的注册表自启逻辑,统一由 AutoStartManager 管理开机启动#118
DoomVoss merged 2 commits into
DoomVoss:mainfrom
ABA2396:fix/AutoStart

Conversation

@ABA2396

@ABA2396 ABA2396 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 27, 2026 09:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/ControlPanelWindow.xaml.cs Outdated
@DoomVoss DoomVoss merged commit 2a059e5 into DoomVoss:main Jun 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants