From b544d5cccd76735e034c8055918a50927b437474 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期二, 10 十一月 2026 08:29:04 +0800
Subject: [PATCH] fix: 维护模式重复进入失败与按钮灰死 + Broker 并发验证用例
---
HMI.UI/Style/MsgBoxStyle.xaml | 91 ++++++++++++++++++++++-----------------------
1 files changed, 45 insertions(+), 46 deletions(-)
diff --git a/HMI.UI/Style/MsgBoxStyle.xaml b/HMI.UI/Style/MsgBoxStyle.xaml
index 984e2cc..39c0a68 100644
--- a/HMI.UI/Style/MsgBoxStyle.xaml
+++ b/HMI.UI/Style/MsgBoxStyle.xaml
@@ -3,27 +3,26 @@
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:MessageBoxXSettings x:Key="MsgBoxWarn"
- InteropOwnersMask="True"
- InverseButtonsSequence="False">
- <pu:MessageBoxXSettings.WindowXStyle>
+ <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="{StaticResource WarningColor}" />
- <Setter Property="pu:WindowXCaption.Foreground" Value="{StaticResource WarningColorContract}" />
+ <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:MessageBoxXSettings.WindowXStyle>
+ </pu:MessageBoxXSetting.WindowXStyle>
- <pu:MessageBoxXSettings.ButtonStyle>
+ <pu:MessageBoxXSetting.ButtonStyle>
<Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:MessageBoxX.ButtonStyleKey}}">
<Style.Triggers>
<Trigger Property="Tag" Value="OK">
- <Setter Property="Foreground" Value="{StaticResource WarningColorContract}" />
- <Setter Property="Background" Value="{StaticResource WarningColor}" />
+ <Setter Property="Foreground" Value="{DynamicResource WarningColorContract}" />
+ <Setter Property="Background" Value="{DynamicResource WarningColor}" />
</Trigger>
<Trigger Property="Tag" Value="Cancel">
@@ -33,36 +32,36 @@
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
- <TextBlock Text="{Binding}" TextDecorations="Underline" />
+ <TextBlock Text="{DynamicResource App.Cancel}" TextDecorations="Underline" />
</DataTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
- </pu:MessageBoxXSettings.ButtonStyle>
- </pu:MessageBoxXSettings>
+ </pu:MessageBoxXSetting.ButtonStyle>
+ </pu:MessageBoxXSetting>
- <pu:MessageBoxXSettings x:Key="MsgBoxError"
- InteropOwnersMask="True"
- InverseButtonsSequence="False">
- <pu:MessageBoxXSettings.WindowXStyle>
+ <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="{StaticResource DangerColor}" />
- <Setter Property="pu:WindowXCaption.Foreground" Value="{StaticResource DangerColorContrast}" />
+ <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:MessageBoxXSettings.WindowXStyle>
+ </pu:MessageBoxXSetting.WindowXStyle>
- <pu:MessageBoxXSettings.ButtonStyle>
+ <pu:MessageBoxXSetting.ButtonStyle>
<Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:MessageBoxX.ButtonStyleKey}}">
<Style.Triggers>
<Trigger Property="Tag" Value="OK">
- <Setter Property="Foreground" Value="{StaticResource DangerColorContrast}" />
- <Setter Property="Background" Value="{StaticResource DangerColor}" />
+ <Setter Property="Foreground" Value="{DynamicResource DangerColorContrast}" />
+ <Setter Property="Background" Value="{DynamicResource DangerColor}" />
</Trigger>
<Trigger Property="Tag" Value="Cancel">
@@ -72,36 +71,36 @@
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
- <TextBlock Text="{Binding}" TextDecorations="Underline" />
+ <TextBlock Text="{DynamicResource App.Cancel}" TextDecorations="Underline" />
</DataTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
- </pu:MessageBoxXSettings.ButtonStyle>
- </pu:MessageBoxXSettings>
+ </pu:MessageBoxXSetting.ButtonStyle>
+ </pu:MessageBoxXSetting>
- <pu:MessageBoxXSettings x:Key="MsgBoxInfo"
- InteropOwnersMask="True"
- InverseButtonsSequence="False">
- <pu:MessageBoxXSettings.WindowXStyle>
+ <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="{StaticResource PrimaryColor}" />
- <Setter Property="pu:WindowXCaption.Foreground" Value="{StaticResource PrimaryColorContract}" />
+ <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:MessageBoxXSettings.WindowXStyle>
+ </pu:MessageBoxXSetting.WindowXStyle>
- <pu:MessageBoxXSettings.ButtonStyle>
+ <pu:MessageBoxXSetting.ButtonStyle>
<Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:MessageBoxX.ButtonStyleKey}}">
<Style.Triggers>
<Trigger Property="Tag" Value="OK">
- <Setter Property="Foreground" Value="{StaticResource PrimaryColorContract}" />
- <Setter Property="Background" Value="{StaticResource PrimaryColor}" />
+ <Setter Property="Foreground" Value="{DynamicResource PrimaryColorContract}" />
+ <Setter Property="Background" Value="{DynamicResource PrimaryColor}" />
</Trigger>
<Trigger Property="Tag" Value="Cancel">
@@ -111,22 +110,22 @@
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
- <TextBlock Text="{Binding}" TextDecorations="Underline" />
+ <TextBlock Text="{DynamicResource App.Cancel}" TextDecorations="Underline" />
</DataTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
- </pu:MessageBoxXSettings.ButtonStyle>
- </pu:MessageBoxXSettings>
+ </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="{StaticResource SuccessColor}" />
- <Setter Property="Foreground" Value="{StaticResource SuccessColorContrast}" />
+ <Setter Property="Background" Value="{DynamicResource SuccessColor}" />
+ <Setter Property="Foreground" Value="{DynamicResource SuccessColorContrast}" />
</Style>
</pu:ToastSetting.LabelStyle>
</pu:ToastSetting>
@@ -135,8 +134,8 @@
<pu:ToastSetting.LabelStyle>
<Style TargetType="Label" BasedOn="{StaticResource {x:Static pu:Toast.LabelStyleKey}}">
<Setter Property="FontSize" Value="18" />
- <Setter Property="Background" Value="{StaticResource WarningColor}" />
- <Setter Property="Foreground" Value="{StaticResource SuccessColorContrast}" />
+ <Setter Property="Background" Value="{DynamicResource WarningColor}" />
+ <Setter Property="Foreground" Value="{DynamicResource SuccessColorContrast}" />
</Style>
</pu:ToastSetting.LabelStyle>
</pu:ToastSetting>
@@ -145,8 +144,8 @@
<pu:ToastSetting.LabelStyle>
<Style TargetType="Label" BasedOn="{StaticResource {x:Static pu:Toast.LabelStyleKey}}">
<Setter Property="FontSize" Value="18" />
- <Setter Property="Background" Value="{StaticResource DangerColor}" />
- <Setter Property="Foreground" Value="{StaticResource DangerColorContrast}" />
+ <Setter Property="Background" Value="{DynamicResource DangerColor}" />
+ <Setter Property="Foreground" Value="{DynamicResource DangerColorContrast}" />
</Style>
</pu:ToastSetting.LabelStyle>
</pu:ToastSetting>
--
Gitblit v1.9.1