From e3868d4d61ded0e76fc8fe3fdacdd9e6d9113cf1 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 13 十月 2025 08:50:15 +0800
Subject: [PATCH] 优化HMI;
---
WPFProject/LoadingWindow.xaml.cs | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/WPFProject/LoadingWindow.xaml.cs b/WPFProject/LoadingWindow.xaml.cs
index e0c4fc1..4e1ff79 100644
--- a/WPFProject/LoadingWindow.xaml.cs
+++ b/WPFProject/LoadingWindow.xaml.cs
@@ -1,5 +1,4 @@
锘縰sing HMI.Base;
-using HMI.Core.Api;
using HMI.UI.Util;
using Panuon.WPF.UI;
using System;
@@ -85,9 +84,11 @@
private void Button_Click(object sender, RoutedEventArgs e)
{
+ this.Closed -= ShutDownWhen_Closed;
window.Show();
this.Close();
}
+
private PanuonWindow window;
private double total;
private double finished;
@@ -116,9 +117,15 @@
ShowConsole = true;
BtnNext.Visibility = Visibility.Visible;
MsgBoxHelper.Error(this, "鍔犺浇鍑洪敊锛岃纭");
+ this.Closed += ShutDownWhen_Closed; ;
}
}
+ private void ShutDownWhen_Closed(object sender, EventArgs e)
+ {
+ Application.Current.Shutdown();
+ }
+
public void Add(string text, bool? result)
{
Message = text;
--
Gitblit v1.9.1