From 0940f31b7eba1cf6b6a8c1fca72d97cf686e79f2 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期五, 04 七月 2025 10:43:00 +0800
Subject: [PATCH] 优化插件,完善TreeListView
---
Plugin.TestResult/InfoTable.xaml | 39 +++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/Plugin.TestResult/InfoTable.xaml b/Plugin.TestResult/InfoTable.xaml
index bb03d5f..2cbb831 100644
--- a/Plugin.TestResult/InfoTable.xaml
+++ b/Plugin.TestResult/InfoTable.xaml
@@ -4,6 +4,12 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Plugin.TestResult_WPF"
+ xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
+xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
+xmlns:pw="https://opensource.panuon.com/wpf"
+xmlns:pu="https://opensource.panuon.com/wpf-ui"
+xmlns:ui="clr-namespace:HMI.UI;assembly=HMI.UI"
+xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
@@ -18,22 +24,23 @@
<Setter Property="BorderThickness" Value="0"/>
</Style>
</UserControl.Resources>
- <Grid x:Name="infoGrid" Grid.Row="0" local:GridProperties.ShowBorder="True" local:GridProperties.InnerBorderIgnore="Top,Right">
+ <Grid x:Name="infoGrid" Grid.Row="0" dp:GridHelper.InnerBorder="1"
+ dp:GridHelper.InnerBorderIgnore="Top,Right,Bottom">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="2*"/>
+ <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1.5*"/>
- <ColumnDefinition Width="2*"/>
+ <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1.5*"/>
+ <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
- <Label Grid.Row="0" Grid.Column="0">娓╁害</Label>
- <Label Grid.Row="0" Grid.Column="1" Background="Yellow" Content="{Binding temperatureStr}"/>
- <Label Grid.Row="0" Grid.Column="2">鐘舵��</Label>
+ <Label Grid.Row="0" Grid.Column="0" Content="{DynamicResource Tr.Temperature}"/>
+ <Label Grid.Row="0" Grid.Column="1" Background="{DynamicResource CellValue}" Content="{Binding temperatureStr}"/>
+ <Label Grid.Row="0" Grid.Column="2" Content="{DynamicResource Tr.Status}"/>
<Label Grid.Row="0" Grid.Column="3" Content="{Binding statusStr}">
<Label.Style>
<Style TargetType="Label">
@@ -56,7 +63,7 @@
<Setter Property="Background" Value="#1296db"/>
</DataTrigger>
<DataTrigger Binding="{Binding status}" Value="waiting">
- <Setter Property="Background" Value="#6e6e6e"/>
+ <Setter Property="Background" Value="#A5A5A5"/>
</DataTrigger>
<DataTrigger Binding="{Binding status}" Value="alert">
<Setter Property="Background" Value="#e04733"/>
@@ -68,14 +75,14 @@
</Style>
</Label.Style>
</Label>
- <Label Grid.Row="0" Grid.Column="4">鑰佸寲鏁伴噺</Label>
- <Label Grid.Row="0" Grid.Column="5" Background="Yellow" Content="{Binding countStr}"/>
+ <Label Grid.Row="0" Grid.Column="4" Content="{DynamicResource Tr.Count}"/>
+ <Label Grid.Row="0" Grid.Column="5" Background="{DynamicResource CellValue}" Content="{Binding countStr}"/>
- <Label Grid.Row="1" Grid.Column="0">寮�濮嬫椂闂�</Label>
- <Label Grid.Row="1" Grid.Column="1" Background="Yellow" Content="{Binding startTimeStr}"/>
- <Label Grid.Row="1" Grid.Column="2">宸茶�佸寲鏃堕棿</Label>
- <Label Grid.Row="1" Grid.Column="3" Background="Yellow" Content="{Binding consumeTimeStr}"/>
- <Label Grid.Row="1" Grid.Column="4">棰勮缁撴潫鏃堕棿</Label>
- <Label Grid.Row="1" Grid.Column="5" Background="Yellow" Content="{Binding endTimeStr}"/>
+ <Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource Tr.StartTime}"/>
+ <Label Grid.Row="1" Grid.Column="1" Background="{DynamicResource CellValue}" Content="{Binding startTimeStr}"/>
+ <Label Grid.Row="1" Grid.Column="2" Content="{DynamicResource Tr.ElapsedTime}"/>
+ <Label Grid.Row="1" Grid.Column="3" Background="{DynamicResource CellValue}" Content="{Binding consumeTimeStr}"/>
+ <Label Grid.Row="1" Grid.Column="4" Content="{DynamicResource Tr.EstimatedEndTime}"/>
+ <Label Grid.Row="1" Grid.Column="5" Background="{DynamicResource CellValue}" Content="{Binding endTimeStr}"/>
</Grid>
</UserControl>
--
Gitblit v1.9.1