From 7bf89fd93bc487e8445d6d85bb527251b7371a04 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 12 五月 2025 13:14:11 +0800
Subject: [PATCH] 优化项目;

---
 Plugin.TsExecution/TsExecution.xaml |   65 +++++++++++++++++++++++++++++---
 1 files changed, 59 insertions(+), 6 deletions(-)

diff --git a/Plugin.TsExecution/TsExecution.xaml b/Plugin.TsExecution/TsExecution.xaml
index ced5ec4..c6373ff 100644
--- a/Plugin.TsExecution/TsExecution.xaml
+++ b/Plugin.TsExecution/TsExecution.xaml
@@ -22,15 +22,25 @@
             <ColumnDefinition Width="2*"/>
         </Grid.ColumnDefinitions>
         <WindowsFormsHost x:Name="host" Visibility="Collapsed"></WindowsFormsHost>
-        <Border>
+
+        <Grid>
+            <Grid.RowDefinitions>
+                <RowDefinition/>
+                <RowDefinition Height="Auto"/>
+            </Grid.RowDefinitions>
             <UniformGrid x:Name="panel" Columns="2" dp:UniformGridHelper.InnerBorder="1" 
-                         dp:UniformGridHelper.InnerBorderBrush="{StaticResource CommonBoarder}">
+                         dp:UniformGridHelper.InnerBorderBrush="#3a3a3a">
 
             </UniformGrid>
-        </Border>
+            <Border Grid.Row="1" Visibility="{Binding AlarmVisiable,Converter={StaticResource vbConverter}}" 
+                     Height="50" Background="Red"/>
+        </Grid>
+
+
 
         <Grid Grid.Column="1">
             <Grid.RowDefinitions>
+                <RowDefinition Height="Auto"/>
                 <RowDefinition Height="Auto"/>
                 <RowDefinition Height="Auto"/>
                 <RowDefinition />
@@ -49,8 +59,30 @@
                 </pu:FormGroup>
             </GroupBox>
 
-            <GroupBox Grid.Row="1">
+            <GroupBox Grid.Row="2">
                 <StackPanel>
+                    <pu:FormGroup Header="{DynamicResource Ts.MesStatus}" GroupName="Number">
+                        <Label Grid.Row="1">
+                            <Label.Style>
+                                <Style TargetType="Label">
+                                    <Setter Property="Foreground" Value="#FFF"/>
+                                    <Setter Property="HorizontalContentAlignment" Value="Center"/>
+                                    <Setter Property="FontSize" Value="16"/>
+                                    <Setter Property="FontWeight" Value="Bold"/>
+                                    <Style.Triggers>
+                                        <DataTrigger Binding="{Binding EnableMes}" Value="True">
+                                            <Setter Property="Background" Value="Green"/>
+                                            <Setter Property="Content" Value="{DynamicResource Ts.MesStatus.Enable}"/>
+                                        </DataTrigger>
+                                        <DataTrigger Binding="{Binding EnableMes}" Value="False">
+                                            <Setter Property="Background" Value="Red"/>
+                                            <Setter Property="Content" Value="{DynamicResource Ts.MesStatus.Disable}"/>
+                                        </DataTrigger>
+                                    </Style.Triggers>
+                                </Style>
+                            </Label.Style>
+                        </Label>
+                    </pu:FormGroup>
                     <pu:FormGroup Header="{DynamicResource Ts.Total}" GroupName="Number">
                         <TextBox Style="{StaticResource EditorTextBoxStyle}"  IsReadOnly="True"
                  x:Name="TbTotal"/>
@@ -70,16 +102,17 @@
                 </StackPanel>
             </GroupBox>
 
-            <GroupBox Grid.Row="2">
+            <GroupBox Grid.Row="3">
                 <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                     <ScottPlot:WpfPlot Background="Transparent" x:Name="pieChart" MinWidth="300" MinHeight="300"
                    SizeChanged="PluginControl_SizeChanged"/>
                 </ScrollViewer>
             </GroupBox>
 
-            <GroupBox Grid.Row="3">
+            <GroupBox Grid.Row="4">
                 <Grid dp:GridHelper.Space="20">
                     <Grid.RowDefinitions>
+                        <RowDefinition/>
                         <RowDefinition/>
                         <RowDefinition/>
                         <RowDefinition/>
@@ -110,6 +143,26 @@
                         </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"
     CheckedBackground="{StaticResource PrimaryColor}"
     CheckedBorderBrush="#36abff"

--
Gitblit v1.9.1