Commit Graph

4 Commits

Author SHA1 Message Date
599964f078 Phase 5: 系统托盘与开机自启
- 系统托盘: NotifyIcon 常驻, 程序化生成 32x32 图标, 左键切换显示/隐藏, 右键菜单(显示主界面/设置/彻底退出)

- 窗口关闭拦截: OnClosing 取消关闭改为 Hide(), 退出菜单执行真实 Shutdown()

- 开机自启: AutoStartHelper 写入/删除 HKCU\...\Run 注册表项, UI 开关按钮显示 ✔/⊗ 状态

- 静默启动: -autostart 参数下 mainWindow.Hide() 直接最小化到托盘

- 类型冲突解决: ImplicitUsings=disable + GlobalUsings.cs 统一全局 using, 消除 WPF/WinForms 共享类型冲突

- 测试: 75 tests total (含 AutoStartHelper 2 tests)
2026-05-09 23:31:39 +08:00
dc94d17d99 Phase 3 缺陷修复 + 分类管理功能 + ComboBox 主题适配
缺陷修复: 日志自动滚动、StaticResource 顺序修复、ContextMenu PlacementTarget 绑定、PATH 命令支持、异常全量捕获、RefreshData 状态保留、全局崩溃日志

分类管理: 添加/编辑/删除分类,删除时工具移入全部,CategoryEditViewModel/Window

UI 修复: ComboBox 自定义模板,暗色模式弹出层/下拉项主题配色,文本绑定修复
2026-05-09 22:53:19 +08:00
71be5da54b Phase 2-3: UI layout, theme switching, CRUD tools, process execution
- Phase 2: MainWindow 3-section layout (sidebar/content/log bar), Dark/Light theme with ThemeHelper, MainViewModel with ObservableProperty/RelayCommand, tool card filtering by search + category

- Phase 3: ToolEditWindow for add/edit tools, ProcessExecutionService (Process.Start + error handling), double-click + right-click context menu (run/edit), path browse dialog

- Bugfix: ContextMenu commands now use PlacementTarget.Tag binding (ContextMenu in separate visual tree)

- Bugfix: StaticResource converters moved to XAML before DataTemplate to fix XamlParseException on tool card render

- Bugfix: Pure filenames (no path separators) treated as PATH commands, not marked invalid

- Bugfix: RefreshData preserves SelectedCategory; Load() catches all exceptions; Save() wrapped in try-catch; auto-scroll log to newest entry

- Tests: xUnit project with 55 tests covering models, services, converters, and view models
2026-05-09 21:52:31 +08:00
875e331116 Phase 0: 项目初始化与基础架构
- 创建 .NET 8 WPF 项目 PersonalToolBox
- 引入 NuGet 包: CommunityToolkit.Mvvm, System.Text.Json, Microsoft.Extensions.DependencyInjection
- 建立 MVVM 目录结构: Models/ ViewModels/ Views/ Services/ Helpers/
- 实现 LogEntry 模型 (时间/日志级别/内容)
- 实现 ILogService 接口与 LogService (线程安全, 通过 Dispatcher 推送到 UI)
- 配置 DI 容器 (App.xaml.cs) 注册日志服务和主窗口
- 添加 .gitignore 文件
2026-05-09 20:26:51 +08:00