From 99df058a665ea04065a23e729ec79a2f23f79881 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期二, 20 五月 2025 16:59:43 +0800
Subject: [PATCH] 优化
---
Plugin.TsExecution/TsExecution.xaml | 132 ++++++++++++++++++++++++++++++++-----------
1 files changed, 98 insertions(+), 34 deletions(-)
diff --git a/Plugin.TsExecution/TsExecution.xaml b/Plugin.TsExecution/TsExecution.xaml
index c6373ff..e2dbdfe 100644
--- a/Plugin.TsExecution/TsExecution.xaml
+++ b/Plugin.TsExecution/TsExecution.xaml
@@ -13,32 +13,116 @@
mc:Ignorable="d"
Padding="10"
Loaded="PluginControl_Loaded"
- SizeChanged="PluginControl_SizeChanged"
+ SizeChanged="PluginControl_SizeChanged"
Background="{StaticResource WorkspaceBackground}"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="8*"/>
- <ColumnDefinition Width="2*"/>
+ <ColumnDefinition />
+ <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition/>
+ </Grid.RowDefinitions>
<WindowsFormsHost x:Name="host" Visibility="Collapsed"></WindowsFormsHost>
- <Grid>
+ <DockPanel Grid.Row="0" Grid.ColumnSpan="2" LastChildFill="False">
+ <DockPanel.Resources>
+ <Style TargetType="CheckBox">
+ <Setter Property="FontSize" Value="20"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ </Style>
+ </DockPanel.Resources>
+
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" dp:StackPanelHelper.ChildSpace="20">
+ <pu:FormGroup HeaderHeight="Auto" HeaderPadding="0">
+ <pu:FormGroup.Header>
+ <TextBlock FontSize="20" Foreground="#000" Text="{DynamicResource Ts.SelectProductModel}"/>
+ </pu:FormGroup.Header>
+ <ComboBox Style="{StaticResource FormComboxStyle}" MinWidth="180" ItemsSource="{Binding Products}"
+DisplayMemberPath="Name" SelectedValuePath="Name"
+SelectedItem="{Binding SelectedProduct}" x:Name="CbProduct"/>
+ </pu:FormGroup>
+
+ <CheckBox Grid.Column="1"
+ IsChecked="{Binding EnableMes,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+ Content="{DynamicResource Ts.EnableMes}"
+ />
+ <CheckBox Grid.Column="2"
+ IsChecked="{Binding EnableNGPause,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+ Content="{DynamicResource Ts.EnableNGPause}"
+ />
+ <CheckBox Grid.Column="3"
+ IsChecked="{Binding EnableDebugMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+ Content="{DynamicResource Ts.DebugMode}"/>
+ <CheckBox Grid.Column="4"
+IsChecked="{Binding EnableSimpleMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+Content="{DynamicResource Ts.EnableSimpleMode}"/>
+
+ <CheckBox Grid.Column="4"
+IsChecked="{Binding UI_ShowInfoDock,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+Content="{DynamicResource Ts.UI_ShowInfoDock}"/>
+
+ <Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0"
+ Content="{DynamicResource HMI.User.Code}"
+ />
+ <Label FontSize="20" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="0"
+ Content="{Binding CurrentUserCode}" />
+ </StackPanel>
+
+
+
+ <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="20">
+ <Button Style="{StaticResource SuccessButton}"
+x:Name="BtnStartSeq" Click="Button_Click"
+Content="{DynamicResource Ts.BtnStartSeq}"/>
+ <Button Grid.Row="1" Style="{StaticResource DangerButton}" IsEnabled="False"
+x:Name="BtnStopSeq" Click="Button_Click"
+Content="{DynamicResource Ts.BtnStopSeq}"/>
+ <Button Grid.Row="2" Style="{StaticResource PrimaryButton}"
+x:Name="BtnClearNum" Click="Button_Click"
+Content="{DynamicResource Ts.BtnClearNum}"/>
+ <Button Grid.Row="3"
+x:Name="BtnSample" Click="Button_Click">
+ <Button.Style>
+ <Style TargetType="Button" BasedOn="{StaticResource PrimaryButton}">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding SampleStatus}" Value="True">
+ <Setter Property="Content" Value="{DynamicResource Ts.BtnIsSample}"/>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding SampleStatus}" Value="False">
+ <Setter Property="Content" Value="{DynamicResource Ts.BtnNotSample}"/>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Button.Style>
+ </Button>
+ </StackPanel>
+ </DockPanel>
+
+ <Grid dp:GridHelper.Space="5" Grid.Row="1">
<Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
- <UniformGrid x:Name="panel" Columns="2" dp:UniformGridHelper.InnerBorder="1"
+
+
+ <UniformGrid x:Name="panel" Grid.Row="1" Columns="2" dp:UniformGridHelper.InnerBorder="1"
dp:UniformGridHelper.InnerBorderBrush="#3a3a3a">
+
</UniformGrid>
- <Border Grid.Row="1" Visibility="{Binding AlarmVisiable,Converter={StaticResource vbConverter}}"
- Height="50" Background="Red"/>
+ <Border x:Name="alarmPanel" VerticalAlignment="Bottom" Visibility="Visible" Background="Red"/>
+ <!--<Border Grid.Row="1" x:Name="alarmPanel" Visibility="{Binding AlarmVisiable,Converter={StaticResource vbConverter}}"
+ Height="50" Background="Red"/>-->
</Grid>
- <Grid Grid.Column="1">
+ <Grid Grid.Row="1" Grid.Column="1" x:Name="detailPanel">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
@@ -47,7 +131,7 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
- <GroupBox>
+ <!--<GroupBox>
<pu:FormGroup Orientation="Vertical"
HeaderHeight="Auto"
HeaderPadding="0" Header="{DynamicResource Ts.SelectProductModel}">
@@ -57,7 +141,7 @@
SelectedItem="{Binding SelectedProduct}"
x:Name="CbProduct"/>
</pu:FormGroup>
- </GroupBox>
+ </GroupBox>-->
<GroupBox Grid.Row="2">
<StackPanel>
@@ -109,7 +193,7 @@
</ScrollViewer>
</GroupBox>
- <GroupBox Grid.Row="4">
+ <!-- <GroupBox Grid.Row="4">
<Grid dp:GridHelper.Space="20">
<Grid.RowDefinitions>
<RowDefinition/>
@@ -143,27 +227,7 @@
</Button.Style>
</Button>
- <!--<Grid Grid.Row="4" dp:GridHelper.Space="20" dp:GridHelper.SpaceIgnore="ALL">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
-
- <CheckBox
- IsChecked="{Binding EnableMes,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
- Content="{DynamicResource Ts.EnableMes}"
- />
- <CheckBox Grid.Column="1"
- IsChecked="{Binding EnableCanLog,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
- Content="{DynamicResource Ts.EnableCanLog}"
- />
- <CheckBox Grid.Column="2"
- IsChecked="{Binding EnableDebugMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
- Content="{DynamicResource Ts.DebugMode}"/>
- </Grid>-->
-
- <!--<pu:Switch Grid.Row="3" BoxWidth="120"
+ <pu:Switch Grid.Row="3" BoxWidth="120"
CheckedBackground="{StaticResource PrimaryColor}"
CheckedBorderBrush="#36abff"
ToggleBrush="#030303"
@@ -188,9 +252,9 @@
</DataTemplate.Triggers>
</DataTemplate>
</pu:Switch.BoxTemplate>
- </pu:Switch>-->
+ </pu:Switch>
</Grid>
- </GroupBox>
+ </GroupBox> -->
</Grid>
</Grid>
--
Gitblit v1.9.1