From 2b1a6417285597bc58ef28aa3f01aeee2532cd19 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期二, 04 三月 2025 13:36:17 +0800
Subject: [PATCH] 优化UI;

---
 Plugin.TestResult/ViewControl.xaml.cs |    2 -
 HMI.UI/Style/PanuonResource.xaml      |   27 +++++++++----
 HMI.IOMonitor/IOMonitor.xaml.cs       |   31 ++++++---------
 HMI.UI/Style/Colors.xaml              |    2 
 4 files changed, 33 insertions(+), 29 deletions(-)

diff --git a/HMI.IOMonitor/IOMonitor.xaml.cs b/HMI.IOMonitor/IOMonitor.xaml.cs
index da9de42..a03c2ee 100644
--- a/HMI.IOMonitor/IOMonitor.xaml.cs
+++ b/HMI.IOMonitor/IOMonitor.xaml.cs
@@ -1,26 +1,21 @@
-锘縰sing System.Collections.Generic;
-using System.Configuration;
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using HMI.Base;
-using HMI.Core.Api;
-using HMI.IOMonitor.Entity;
-using log4net;
-using System.Linq;
-using System.IO;
-using HMI.Core.Util;
-using System.Collections.ObjectModel;
+锘縰sing HMI.Base;
 using HMI.Core.Setting;
+using HMI.Core.Util;
+using HMI.IOMonitor.Entity;
 using HMI.UI.Util;
-using System.Timers;
-using System.Windows.Media;
-using System.Threading.Tasks;
-using System.Windows.Data;
 using Microsoft.Win32;
+using NPOI.HSSF.UserModel;
 using NPOI.SS.UserModel;
 using NPOI.XSSF.UserModel;
-using NPOI.HSSF.UserModel;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Timers;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
 
 namespace HMI.IOMonitor
 {
diff --git a/HMI.UI/Style/Colors.xaml b/HMI.UI/Style/Colors.xaml
index 7b7ba9c..36b5526 100644
--- a/HMI.UI/Style/Colors.xaml
+++ b/HMI.UI/Style/Colors.xaml
@@ -1,7 +1,7 @@
 锘�<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <Brush x:Key="WorkspaceBackground">#f0f2f5</Brush>
-    <Brush x:Key="TableHeaderBackground">#fafafa</Brush>
+    <Brush x:Key="TableHeaderBackground">#f7f7f7</Brush>
     <Brush x:Key="TableBoarder">#e8e8e8</Brush>
     <Brush x:Key="CommonBoarder">#e8e8e8</Brush>
 
diff --git a/HMI.UI/Style/PanuonResource.xaml b/HMI.UI/Style/PanuonResource.xaml
index f97f70a..3e74649 100644
--- a/HMI.UI/Style/PanuonResource.xaml
+++ b/HMI.UI/Style/PanuonResource.xaml
@@ -97,22 +97,31 @@
             <Style TargetType="DataGridCell" 
                    BasedOn="{StaticResource {x:Static pu:StyleKeys.DataGridCellStyle}}">
                 <Setter Property="Background" Value="Transparent"/>
-                <Setter Property="Padding" Value="0"/>
+                <Setter Property="Padding" Value="5"/>
                 <Setter Property="BorderThickness" Value="0"/>
                 <Setter Property="VerticalAlignment" Value="Stretch"/>
                 <Setter Property="Background" Value="Transparent"/>
             </Style>
-            <Style TargetType="TextBlock">
+            <!--<Style TargetType="TextBlock">
                 <Setter Property="VerticalAlignment" Value="Center"/>
-                <Setter Property="Padding" Value="10"/>
-            </Style>
-        </Style.Resources>
+                <Setter Property="Padding" Value="5"/>
+            </Style>-->
 
+            <Style TargetType="DataGridColumnHeader" 
+       BasedOn="{StaticResource {x:Static pu:StyleKeys.DataGridColumnHeaderStyle}}">
+                <Setter Property="Padding" Value="10"/>
+                <Setter Property="BorderThickness" Value="0"/>
+            </Style>
+
+        </Style.Resources>
+        <Setter Property="Foreground" Value="#FF9B9B9B"/>
+        <Setter Property="pu:DataGridHelper.ColumnHeaderForeground" Value="#878787"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderBackground" Value="{StaticResource TableHeaderBackground}"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderHoverBackground" Value="{StaticResource TableHeaderBackground}"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderSeparatorBrush" Value="{StaticResource TableBoarder}"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderSeparatorVisibility" Value="Visible"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderVerticalContentAlignment" Value="Center"/>
+        <Setter Property="pu:DataGridHelper.ColumnHeaderHorizontalContentAlignment" Value="Left"/>
         <Setter Property="pu:DataGridHelper.RowHeaderBackground" Value="White"/>
         <Setter Property="pu:DataGridHelper.RowHeaderSeparatorBrush" Value="{StaticResource PrimaryColor}"/>
         <Setter Property="pu:DataGridHelper.RowHoverForeground" Value="{StaticResource SecondPrimaryColorContract}"/>
@@ -129,9 +138,11 @@
         <Setter Property="RowHeaderWidth" Value="0"/>
         <Setter Property="IsReadOnly" Value="True"/>
         <Setter Property="GridLinesVisibility" Value="All"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
-        <Setter Property="RowHeight" Value="24"/>
+        <Setter Property="BorderThickness" Value="1,1,0,0"/>
+        <Setter Property="BorderBrush" Value="{StaticResource CommonBoarder}"/>
+        <Setter Property="FontSize" Value="{StaticResource ContentFontSize2}"/>
+        <Setter Property="RowHeight" Value="30"/>
+        <Setter Property="ColumnHeaderHeight" Value="36"/>
         <Setter Property="ForceCursor" Value="True"/>
         <Setter Property="SelectionMode" Value="Single"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderBorderThickness" Value="0"/>
diff --git a/Plugin.TestResult/ViewControl.xaml.cs b/Plugin.TestResult/ViewControl.xaml.cs
index fc91920..4f2425f 100644
--- a/Plugin.TestResult/ViewControl.xaml.cs
+++ b/Plugin.TestResult/ViewControl.xaml.cs
@@ -172,8 +172,6 @@
                 //this.Time_Heating_Low = Convert.ToDouble(this.parameterManager.Find("Time_Heat_Low").ParmValue);
                 //this.Time_Heating_High = Convert.ToDouble(this.parameterManager.Find("Time_Heat_High").ParmValue);
                 testResultView.testSeqFile = this.parameterManager.Find("TestSequence").ParmValue.ToString(); // @"D:\BurnIn\TestDemo.seq"
-
-
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.1