From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点
---
HMI.UI/Style/MsgBoxStyle.xaml | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 152 insertions(+), 0 deletions(-)
diff --git a/HMI.UI/Style/MsgBoxStyle.xaml b/HMI.UI/Style/MsgBoxStyle.xaml
new file mode 100644
index 0000000..39c0a68
--- /dev/null
+++ b/HMI.UI/Style/MsgBoxStyle.xaml
@@ -0,0 +1,152 @@
+锘�<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:pw="https://opensource.panuon.com/wpf"
+ xmlns:pu="https://opensource.panuon.com/wpf-ui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+xmlns:puconfig="clr-namespace:Panuon.WPF.UI.Configurations;assembly=Panuon.WPF.UI">
+ <pu:MessageBoxXSetting x:Key="MsgBoxWarn"
+ InteropOwnersMask="False"
+ InverseButtonsSequence="False">
+ <pu:MessageBoxXSetting.WindowXStyle>
+ <Style TargetType="pu:WindowX" BasedOn="{StaticResource {x:Static pu:MessageBoxX.WindowXStyleKey}}">
+ <Setter Property="pu:WindowXCaption.Background" Value="{DynamicResource WarningColor}" />
+ <Setter Property="pu:WindowXCaption.Foreground" Value="{DynamicResource WarningColorContract}" />
+ <Setter Property="Width" Value="350" />
+ <Setter Property="Height" Value="200" />
+ <Setter Property="SizeToContent" Value="Manual" />
+ </Style>
+ </pu:MessageBoxXSetting.WindowXStyle>
+
+ <pu:MessageBoxXSetting.ButtonStyle>
+ <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:MessageBoxX.ButtonStyleKey}}">
+
+ <Style.Triggers>
+ <Trigger Property="Tag" Value="OK">
+ <Setter Property="Foreground" Value="{DynamicResource WarningColorContract}" />
+ <Setter Property="Background" Value="{DynamicResource WarningColor}" />
+ </Trigger>
+
+ <Trigger Property="Tag" Value="Cancel">
+ <Setter Property="Background" Value="{x:Null}" />
+ <Setter Property="Foreground" Value="Gray" />
+ <Setter Property="Cursor" Value="Hand" />
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <TextBlock Text="{DynamicResource App.Cancel}" TextDecorations="Underline" />
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </pu:MessageBoxXSetting.ButtonStyle>
+ </pu:MessageBoxXSetting>
+
+ <pu:MessageBoxXSetting x:Key="MsgBoxError"
+ InteropOwnersMask="False"
+ InverseButtonsSequence="False">
+ <pu:MessageBoxXSetting.WindowXStyle>
+ <Style TargetType="pu:WindowX" BasedOn="{StaticResource {x:Static pu:MessageBoxX.WindowXStyleKey}}">
+ <Setter Property="pu:WindowXCaption.Background" Value="{DynamicResource DangerColor}" />
+ <Setter Property="pu:WindowXCaption.Foreground" Value="{DynamicResource DangerColorContrast}" />
+ <Setter Property="Width" Value="350" />
+ <Setter Property="Height" Value="200" />
+ <Setter Property="SizeToContent" Value="Manual" />
+ </Style>
+ </pu:MessageBoxXSetting.WindowXStyle>
+
+ <pu:MessageBoxXSetting.ButtonStyle>
+ <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:MessageBoxX.ButtonStyleKey}}">
+
+ <Style.Triggers>
+ <Trigger Property="Tag" Value="OK">
+ <Setter Property="Foreground" Value="{DynamicResource DangerColorContrast}" />
+ <Setter Property="Background" Value="{DynamicResource DangerColor}" />
+ </Trigger>
+
+ <Trigger Property="Tag" Value="Cancel">
+ <Setter Property="Background" Value="{x:Null}" />
+ <Setter Property="Foreground" Value="Gray" />
+ <Setter Property="Cursor" Value="Hand" />
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <TextBlock Text="{DynamicResource App.Cancel}" TextDecorations="Underline" />
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </pu:MessageBoxXSetting.ButtonStyle>
+ </pu:MessageBoxXSetting>
+
+ <pu:MessageBoxXSetting x:Key="MsgBoxInfo"
+ InteropOwnersMask="False"
+ InverseButtonsSequence="False">
+ <pu:MessageBoxXSetting.WindowXStyle>
+ <Style TargetType="pu:WindowX" BasedOn="{StaticResource {x:Static pu:MessageBoxX.WindowXStyleKey}}">
+ <Setter Property="pu:WindowXCaption.Background" Value="{DynamicResource PrimaryColor}" />
+ <Setter Property="pu:WindowXCaption.Foreground" Value="{DynamicResource PrimaryColorContract}" />
+ <Setter Property="Width" Value="350" />
+ <Setter Property="Height" Value="200" />
+ <Setter Property="SizeToContent" Value="Manual" />
+ </Style>
+ </pu:MessageBoxXSetting.WindowXStyle>
+
+ <pu:MessageBoxXSetting.ButtonStyle>
+ <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:MessageBoxX.ButtonStyleKey}}">
+
+ <Style.Triggers>
+ <Trigger Property="Tag" Value="OK">
+ <Setter Property="Foreground" Value="{DynamicResource PrimaryColorContract}" />
+ <Setter Property="Background" Value="{DynamicResource PrimaryColor}" />
+ </Trigger>
+
+ <Trigger Property="Tag" Value="Cancel">
+ <Setter Property="Background" Value="{x:Null}" />
+ <Setter Property="Foreground" Value="Gray" />
+ <Setter Property="Cursor" Value="Hand" />
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <TextBlock Text="{DynamicResource App.Cancel}" TextDecorations="Underline" />
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </pu:MessageBoxXSetting.ButtonStyle>
+ </pu:MessageBoxXSetting>
+
+ <pu:ToastSetting x:Key="toastSuccess" Spacing="25">
+ <pu:ToastSetting.LabelStyle>
+ <Style TargetType="Label" BasedOn="{StaticResource {x:Static pu:Toast.LabelStyleKey}}">
+ <Setter Property="FontSize" Value="18" />
+ <Setter Property="Background" Value="{DynamicResource SuccessColor}" />
+ <Setter Property="Foreground" Value="{DynamicResource SuccessColorContrast}" />
+ </Style>
+ </pu:ToastSetting.LabelStyle>
+ </pu:ToastSetting>
+
+ <pu:ToastSetting x:Key="toastWarning" Spacing="25">
+ <pu:ToastSetting.LabelStyle>
+ <Style TargetType="Label" BasedOn="{StaticResource {x:Static pu:Toast.LabelStyleKey}}">
+ <Setter Property="FontSize" Value="18" />
+ <Setter Property="Background" Value="{DynamicResource WarningColor}" />
+ <Setter Property="Foreground" Value="{DynamicResource SuccessColorContrast}" />
+ </Style>
+ </pu:ToastSetting.LabelStyle>
+ </pu:ToastSetting>
+
+ <pu:ToastSetting x:Key="toastError" Spacing="25">
+ <pu:ToastSetting.LabelStyle>
+ <Style TargetType="Label" BasedOn="{StaticResource {x:Static pu:Toast.LabelStyleKey}}">
+ <Setter Property="FontSize" Value="18" />
+ <Setter Property="Background" Value="{DynamicResource DangerColor}" />
+ <Setter Property="Foreground" Value="{DynamicResource DangerColorContrast}" />
+ </Style>
+ </pu:ToastSetting.LabelStyle>
+ </pu:ToastSetting>
+</ResourceDictionary>
\ No newline at end of file
--
Gitblit v1.9.1