From 1fca2167068e9ef2c079ec742f20313fc6697ab1 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 03 三月 2025 09:18:33 +0800
Subject: [PATCH] 完善代码;

---
 HMI.UI/Style/FormStyle.xaml |   32 +++++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)

diff --git a/HMI.UI/Style/FormStyle.xaml b/HMI.UI/Style/FormStyle.xaml
index 9056d01..42eb600 100644
--- a/HMI.UI/Style/FormStyle.xaml
+++ b/HMI.UI/Style/FormStyle.xaml
@@ -95,6 +95,24 @@
         </Style.Triggers>
     </Style>
 
+    <Style x:Key="FormNumberInput" TargetType="pu:NumberInput" BasedOn="{StaticResource {x:Type pu:NumberInput}}">
+        <Setter Property="pu:TextBoxHelper.FocusedBorderBrush" Value="#6CBCEA" />
+        <Setter Property="pu:TextBoxHelper.FocusedShadowColor" Value="#6CBCEA" />
+        <Setter Property="pu:TextBoxHelper.CornerRadius" Value="0" />
+        <Setter Property="pu:TextBoxHelper.WatermarkForeground" Value="#4A4A4A" />
+        <Setter Property="pu:TextBoxHelper.FocusedWatermarkForeground" Value="#AAAAAA" />
+        <Setter Property="Height" Value="35" />
+        <Setter Property="Padding" Value="5,0" />
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Foreground" Value="Black" />
+        <Setter Property="VerticalContentAlignment" Value="Center"/>
+        <Style.Triggers>
+            <Trigger Property="IsReadOnly" Value="True">
+                <Setter Property="Background" Value="LightGray"/>
+            </Trigger>
+        </Style.Triggers>
+    </Style>
+
     <Style x:Key="MultilineEditorTextBoxStyle" TargetType="TextBox" BasedOn="{StaticResource EditorTextBoxStyle}">
         <Setter Property="Height" Value="100" />
         <Setter Property="Padding" Value="5,10" />
@@ -130,7 +148,7 @@
 
     <Style x:Key="FormComboxStyle" TargetType="ComboBox" BasedOn="{StaticResource {x:Type ComboBox}}">
         <Setter Property="pu:ComboBoxHelper.CornerRadius" Value="0"/>
-        <Setter Property="pu:ComboBoxHelper.ItemsHoverBackground" Value="{StaticResource WindowBar}"/>
+        <Setter Property="pu:ComboBoxHelper.ItemsHoverBackground" Value="{StaticResource SecondPrimaryColor}"/>
         <Setter Property="pu:ComboBoxHelper.ItemsHoverForeground" Value="#FFF"/>
         <Setter Property="pu:ComboBoxHelper.ItemsSelectedForeground" Value="Black"/>
         <Setter Property="pu:ComboBoxHelper.HoverBorderBrush" Value="#007ACC" />
@@ -145,4 +163,16 @@
         <Setter Property="Foreground" Value="Black" />
         <Setter Property="SelectedValuePath" Value="Content"/>
     </Style>
+
+    <Style x:Key="TimePicker" TargetType="pu:DateTimePicker">
+        <Setter Property="Height" Value="35"/>
+        <Setter Property="ClearButtonVisibility" Value="Visible"/>
+        <Setter Property="ItemsCheckedBackground" Value="{StaticResource PrimaryColor}"/>
+        <Setter Property="ItemsCheckedForeground" Value="{StaticResource SecondPrimaryColorContract}"/>
+        <Setter Property="ItemsHoverBackground" Value="{StaticResource SecondPrimaryColor}"/>
+        <Setter Property="ItemsHoverForeground" Value="{StaticResource SecondPrimaryColorContract}"/>
+        <Setter Property="TextStringFormat" Value="yyyy-MM-dd HH:mm:ss"/>
+        <Setter Property="Mode" Value="DateTime"/>
+    </Style>
+
 </ResourceDictionary>
\ No newline at end of file

--
Gitblit v1.9.1