From 559890c482f5973f06aafdfec9550fee5ba3c7f2 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 09 十一月 2026 17:02:15 +0800
Subject: [PATCH] feat: CAN 模拟器 TCP 化 + 多设备并发调试 + 后台生命周期管理

---
 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