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 并发验证用例

---
 WPFProject/PanuonWindow.xaml.cs |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/WPFProject/PanuonWindow.xaml.cs b/WPFProject/PanuonWindow.xaml.cs
index 06799af..7dceeff 100644
--- a/WPFProject/PanuonWindow.xaml.cs
+++ b/WPFProject/PanuonWindow.xaml.cs
@@ -116,11 +116,14 @@
                 Application.Current.MainWindow = this;
                 SystemSetting.SystemSettingChanged += SystemSetting_SystemSettingChanged;
 
-                Task.Run(() =>
+                if (Environment.Is64BitProcess)
                 {
-                    ResourceListener.Instance.RefreshEvent += this.resourceUI.Refresh;
-                    ResourceListener.Instance.Start();
-                });
+                    Task.Run(() =>
+                    {
+                        ResourceListener.Instance.RefreshEvent += this.resourceUI.Refresh;
+                        ResourceListener.Instance.Start();
+                    });
+                }
             }
             catch (Exception ex)
             {
@@ -280,7 +283,16 @@
                     this.Minimize();
                     break;
                 case "maxBtn":
-                    this.Maximize();
+                    //var state = this.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
+                    //SetCurrentValue(Window.WindowStateProperty, state);
+                    if (this.WindowState == WindowState.Maximized)
+                    {
+                        this.Normalmize();
+                    }
+                    else
+                    {
+                        this.Maximize();
+                    }
                     break;
                 case "closeBtn":
                     this.Closed -= Logout_PanuonWindow_Closed;

--
Gitblit v1.9.1