feat: 统一项目命名并补充路径失效报告
将内部项目目录、命名空间、配置目录、自启注册表值和设计/开发文档统一为 PersonalToolbox。 扩展路径校验服务,输出失效工具、字段、原因和路径,并在启动日志、设置页路径检查与导入配置流程中展示明细报告。 验证:dotnet build PersonalToolbox.sln
This commit is contained in:
166
src/PersonalToolbox/Views/CombinationEditorWindow.xaml
Normal file
166
src/PersonalToolbox/Views/CombinationEditorWindow.xaml
Normal file
@@ -0,0 +1,166 @@
|
||||
<Window x:Class="PersonalToolbox.Views.CombinationEditorWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="编辑组合"
|
||||
Width="760"
|
||||
Height="640"
|
||||
MinWidth="680"
|
||||
MinHeight="560"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
<Grid Margin="18">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="96" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="96" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="名称" VerticalAlignment="Center" />
|
||||
<TextBox x:Name="NameTextBox"
|
||||
Grid.Column="1"
|
||||
MinHeight="32"
|
||||
Margin="0,0,16,8"
|
||||
ToolTip="组合卡片显示名称。" />
|
||||
|
||||
<TextBlock Grid.Column="2" Text="分类" VerticalAlignment="Center" />
|
||||
<ComboBox x:Name="CategoryComboBox"
|
||||
Grid.Column="3"
|
||||
MinHeight="32"
|
||||
Margin="0,0,0,8"
|
||||
DisplayMemberPath="Name"
|
||||
SelectedValuePath="Id"
|
||||
ToolTip="组合也作为一种工具,只能属于一个一级分类。" />
|
||||
|
||||
<TextBlock Grid.Row="1" Text="说明" VerticalAlignment="Top" Margin="0,8,0,0" />
|
||||
<TextBox x:Name="DescriptionTextBox"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="3"
|
||||
MinHeight="58"
|
||||
TextWrapping="Wrap"
|
||||
AcceptsReturn="True"
|
||||
ToolTip="描述这个组合会打开哪些环境或工具。" />
|
||||
|
||||
<TextBlock Grid.Row="2" Text="快捷键" VerticalAlignment="Center" />
|
||||
<TextBox x:Name="HotkeyTextBox"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
MinHeight="32"
|
||||
Margin="0,8,16,0"
|
||||
ToolTip="格式示例:Ctrl + Alt + D。组合可被全局快捷键直接启动。" />
|
||||
|
||||
<StackPanel Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
Grid.ColumnSpan="2"
|
||||
Orientation="Horizontal"
|
||||
Margin="0,8,0,0">
|
||||
<CheckBox x:Name="AutoRunCheckBox"
|
||||
Content="工具箱启动时自动运行"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="开启后组合会出现在自动运行列表中。" />
|
||||
<ComboBox x:Name="FailurePolicyComboBox"
|
||||
Width="180"
|
||||
Margin="18,0,0,0"
|
||||
ToolTip="设置成员启动失败后继续执行,还是停止整个组合。">
|
||||
<ComboBoxItem Content="失败后继续" Tag="Continue" />
|
||||
<ComboBoxItem Content="失败后停止" Tag="Stop" />
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Margin="0,16,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ComboBox x:Name="ToolPickerComboBox"
|
||||
Width="300"
|
||||
DisplayMemberPath="Name"
|
||||
ToolTip="从已有工具或组合中选择一个成员。" />
|
||||
<Button Content="添加成员"
|
||||
Width="96"
|
||||
Margin="8,0,0,0"
|
||||
ToolTip="把选择的工具加入组合成员列表。"
|
||||
Click="AddMemberButton_OnClick" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<Button Content="上移"
|
||||
Width="70"
|
||||
Margin="0,0,8,0"
|
||||
ToolTip="将选中成员提前执行。"
|
||||
Click="MoveUpButton_OnClick" />
|
||||
<Button Content="下移"
|
||||
Width="70"
|
||||
Margin="0,0,8,0"
|
||||
ToolTip="将选中成员延后执行。"
|
||||
Click="MoveDownButton_OnClick" />
|
||||
<Button Content="移除"
|
||||
Width="70"
|
||||
ToolTip="从组合中移除选中成员。"
|
||||
Click="RemoveMemberButton_OnClick" />
|
||||
</StackPanel>
|
||||
|
||||
<DataGrid x:Name="MembersDataGrid"
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,10,0,0"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
SelectionMode="Single"
|
||||
ToolTip="组合成员会按列表顺序启动,可临时禁用成员并设置执行后的等待间隔。">
|
||||
<DataGrid.Columns>
|
||||
<DataGridCheckBoxColumn Header="启用"
|
||||
Width="70"
|
||||
Binding="{Binding Enabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<DataGridTextColumn Header="名称"
|
||||
Width="*"
|
||||
IsReadOnly="True"
|
||||
Binding="{Binding ToolName}" />
|
||||
<DataGridTextColumn Header="类型"
|
||||
Width="90"
|
||||
IsReadOnly="True"
|
||||
Binding="{Binding ToolTypeLabel}" />
|
||||
<DataGridTextColumn Header="间隔(ms)"
|
||||
Width="110"
|
||||
Binding="{Binding IntervalAfterMs, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Grid.Row="2"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,14,0,0">
|
||||
<Button Content="保存"
|
||||
Width="88"
|
||||
Margin="0,0,8,0"
|
||||
IsDefault="True"
|
||||
ToolTip="校验循环引用和重复工具后保存组合。"
|
||||
Click="SaveButton_OnClick" />
|
||||
<Button Content="取消"
|
||||
Width="88"
|
||||
IsCancel="True"
|
||||
ToolTip="放弃本次组合修改。"
|
||||
Click="CancelButton_OnClick" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user