调整CNC按钮逻辑改为内置

This commit is contained in:
zhengxuan.zhang
2026-05-06 11:12:05 +08:00
parent f5dceeceb7
commit d4050b4218
3 changed files with 110 additions and 7 deletions
+103
View File
@@ -96,6 +96,19 @@
<Setter Property="FontFamily" Value="{StaticResource UiFont}" />
<Setter Property="FontSize" Value="11" />
</Style>
<Style x:Key="TreeToolbarButtonCompact" TargetType="Button" BasedOn="{StaticResource TreeToolbarButton}">
<Setter Property="MinWidth" Value="56" />
<Setter Property="Margin" Value="0,0,4,4" />
<Setter Property="Padding" Value="6,0" />
<Setter Property="FontSize" Value="10.5" />
</Style>
<Style x:Key="TreeToolbarIcon" TargetType="Image">
<Setter Property="Width" Value="12" />
<Setter Property="Height" Value="12" />
<Setter Property="Margin" Value="0,0,4,0" />
<Setter Property="Stretch" Value="Uniform" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</UserControl.Resources>
<Border
@@ -125,6 +138,7 @@
Background="{StaticResource HeaderBg}"
BorderBrush="{StaticResource SeparatorBrush}"
BorderThickness="0,0,0,1">
<StackPanel>
<WrapPanel>
<Button
Command="{Binding NewProgramCommand}"
@@ -143,6 +157,95 @@
Content="导出"
Style="{StaticResource TreeToolbarButton}" />
</WrapPanel>
<WrapPanel Margin="0,4,0,0" Visibility="Collapsed">
<Button
Command="{Binding InsertReferencePointCommand}"
Content="参考点"
Style="{StaticResource TreeToolbarButtonCompact}" />
<Button
Command="{Binding InsertSavePositionCommand}"
Content="添加位置"
Style="{StaticResource TreeToolbarButtonCompact}" />
<Button
Command="{Binding InsertInspectionModuleCommand}"
Content="检测模块"
Style="{StaticResource TreeToolbarButtonCompact}" />
<Button
Command="{Binding InsertInspectionMarkerCommand}"
Content="检测标记"
Style="{StaticResource TreeToolbarButtonCompact}" />
<Button
Command="{Binding InsertPauseDialogCommand}"
Content="消息弹窗"
Style="{StaticResource TreeToolbarButtonCompact}" />
<Button
Command="{Binding InsertWaitDelayCommand}"
Content="插入等待"
Style="{StaticResource TreeToolbarButtonCompact}" />
<Button
Command="{Binding InsertCompleteProgramCommand}"
Content="完成"
Style="{StaticResource TreeToolbarButtonCompact}" />
</WrapPanel>
<WrapPanel Margin="0,4,0,0">
<Button
Command="{Binding InsertReferencePointCommand}"
Style="{StaticResource TreeToolbarButtonCompact}">
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Icons/reference.png" Style="{StaticResource TreeToolbarIcon}" />
<TextBlock Text="参考点" />
</StackPanel>
</Button>
<Button
Command="{Binding InsertSavePositionCommand}"
Style="{StaticResource TreeToolbarButtonCompact}">
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Icons/add-pos.png" Style="{StaticResource TreeToolbarIcon}" />
<TextBlock Text="添加位置" />
</StackPanel>
</Button>
<Button
Command="{Binding InsertInspectionModuleCommand}"
Style="{StaticResource TreeToolbarButtonCompact}">
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Icons/Module.png" Style="{StaticResource TreeToolbarIcon}" />
<TextBlock Text="检测模块" />
</StackPanel>
</Button>
<Button
Command="{Binding InsertInspectionMarkerCommand}"
Style="{StaticResource TreeToolbarButtonCompact}">
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Icons/mark.png" Style="{StaticResource TreeToolbarIcon}" />
<TextBlock Text="检测标记" />
</StackPanel>
</Button>
<Button
Command="{Binding InsertPauseDialogCommand}"
Style="{StaticResource TreeToolbarButtonCompact}">
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Icons/message.png" Style="{StaticResource TreeToolbarIcon}" />
<TextBlock Text="消息弹窗" />
</StackPanel>
</Button>
<Button
Command="{Binding InsertWaitDelayCommand}"
Style="{StaticResource TreeToolbarButtonCompact}">
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Icons/wait.png" Style="{StaticResource TreeToolbarIcon}" />
<TextBlock Text="插入等待" />
</StackPanel>
</Button>
<Button
Command="{Binding InsertCompleteProgramCommand}"
Style="{StaticResource TreeToolbarButtonCompact}">
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Icons/finish.png" Style="{StaticResource TreeToolbarIcon}" />
<TextBlock Text="完成" />
</StackPanel>
</Button>
</WrapPanel>
</StackPanel>
</Border>
<TreeView
+3 -7
View File
@@ -279,7 +279,7 @@
Size="Large"
SmallImage="/Assets/Icons/cnc.png"
Text="CNC 编辑" />
<!--
<StackPanel>
<telerik:RadRibbonButton
telerik:ScreenTip.Title="参考点"
@@ -313,12 +313,7 @@
Command="{Binding InsertInspectionModuleCommand}"
SmallImage="/Assets/Icons/Module.png"
Text="检测模块" />
<telerik:RadRibbonButton
telerik:ScreenTip.Title="全部保存"
Size="Medium"
Command="{Binding SaveCncProgramCommand}"
SmallImage="/Assets/Icons/saveall.png"
Text="全部保存" />
</StackPanel>
<StackPanel>
<telerik:RadRibbonButton
@@ -334,6 +329,7 @@
SmallImage="/Assets/Icons/wait.png"
Text="插入等待" />
</StackPanel>
-->
<telerik:RadRibbonButton
telerik:ScreenTip.Description="打开矩阵编排窗口,配置多工件阵列检测方案"
+4
View File
@@ -150,6 +150,10 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Libs\Hardware\zh-TW\%(Filename)%(Extension)</Link>
</None>
<Compile Remove="Views\Hardware\**" />
<EmbeddedResource Remove="Views\Hardware\**" />
<None Remove="Views\Hardware\**" />
<Page Remove="Views\Hardware\**" />
<Compile Remove="Views\ImageProcessing\ImageProcessingPanelView.xaml.cs" />
<Compile Remove="Views\ImageProcessing\ImageProcessingWindow.xaml.cs" />
<Compile Remove="Views\ImageProcessing\PipelineEditorWindow.xaml.cs" />