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
This commit is contained in:
2026-05-09 21:52:31 +08:00
parent 752f09a7e4
commit 71be5da54b
22 changed files with 1991 additions and 22 deletions

View File

@@ -0,0 +1,20 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- 暗黑主题颜色定义 -->
<SolidColorBrush x:Key="Theme.Background" Color="#1E1E2E"/>
<SolidColorBrush x:Key="Theme.Foreground" Color="#CDD6F4"/>
<SolidColorBrush x:Key="Theme.SidebarBackground" Color="#181825"/>
<SolidColorBrush x:Key="Theme.CardBackground" Color="#313244"/>
<SolidColorBrush x:Key="Theme.CardBorder" Color="#45475A"/>
<SolidColorBrush x:Key="Theme.LogBackground" Color="#11111B"/>
<SolidColorBrush x:Key="Theme.Accent" Color="#89B4FA"/>
<SolidColorBrush x:Key="Theme.AccentHover" Color="#B4BEFE"/>
<SolidColorBrush x:Key="Theme.TextSecondary" Color="#A6ADC8"/>
<SolidColorBrush x:Key="Theme.InputBackground" Color="#313244"/>
<SolidColorBrush x:Key="Theme.InputBorder" Color="#585B70"/>
<SolidColorBrush x:Key="Theme.ButtonBackground" Color="#89B4FA"/>
<SolidColorBrush x:Key="Theme.ButtonForeground" Color="#1E1E2E"/>
<SolidColorBrush x:Key="Theme.ScrollBarBackground" Color="#313244"/>
</ResourceDictionary>

View File

@@ -0,0 +1,20 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- 明亮主题颜色定义 -->
<SolidColorBrush x:Key="Theme.Background" Color="#EFF1F5"/>
<SolidColorBrush x:Key="Theme.Foreground" Color="#4C4F69"/>
<SolidColorBrush x:Key="Theme.SidebarBackground" Color="#E6E9EF"/>
<SolidColorBrush x:Key="Theme.CardBackground" Color="#FFFFFF"/>
<SolidColorBrush x:Key="Theme.CardBorder" Color="#CCD0DA"/>
<SolidColorBrush x:Key="Theme.LogBackground" Color="#DCE0E8"/>
<SolidColorBrush x:Key="Theme.Accent" Color="#1E66F5"/>
<SolidColorBrush x:Key="Theme.AccentHover" Color="#2A6EF5"/>
<SolidColorBrush x:Key="Theme.TextSecondary" Color="#6C6F85"/>
<SolidColorBrush x:Key="Theme.InputBackground" Color="#FFFFFF"/>
<SolidColorBrush x:Key="Theme.InputBorder" Color="#9CA0B0"/>
<SolidColorBrush x:Key="Theme.ButtonBackground" Color="#1E66F5"/>
<SolidColorBrush x:Key="Theme.ButtonForeground" Color="#FFFFFF"/>
<SolidColorBrush x:Key="Theme.ScrollBarBackground" Color="#CCD0DA"/>
</ResourceDictionary>