From af620ae141ef7de3ab3e339aaa1d4e9f9fd26914 Mon Sep 17 00:00:00 2001
From: maqiao <625215135@qq.com>
Date: Tue, 4 Mar 2025 15:39:35 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E6=8E=A5=E6=9F=9C=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E7=B4=A7=E6=80=A5=E5=BC=80=E9=94=81=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ViewModels/EmergencyWindowViewModel.cs | 10 ++
DM_Weight/Views/EmergencyWindow.xaml | 150 ++++++++++--------
2 files changed, 95 insertions(+), 65 deletions(-)
diff --git a/DM_Weight/ViewModels/EmergencyWindowViewModel.cs b/DM_Weight/ViewModels/EmergencyWindowViewModel.cs
index fda0380..468e4e9 100644
--- a/DM_Weight/ViewModels/EmergencyWindowViewModel.cs
+++ b/DM_Weight/ViewModels/EmergencyWindowViewModel.cs
@@ -10,6 +10,7 @@ using Prism.Regions;
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -66,6 +67,15 @@ namespace DM_Weight.ViewModels
_regionManager.RequestNavigate("MainRegion", "LoginWindow");
});
}
+ private DelegateCommand? _exitCommand;
+ public DelegateCommand ExitCommand => _exitCommand ??= new DelegateCommand(Exit);
+ void Exit()
+ {
+ //_chkFunction.HIKLoginOut();
+ _socketHelper.SocketDisConnect();
+ Process.GetCurrentProcess().Kill();
+ Environment.Exit(0);
+ }
//间隔1分钟查询数据库连接状态
private void CheckDBConnect()
{
diff --git a/DM_Weight/Views/EmergencyWindow.xaml b/DM_Weight/Views/EmergencyWindow.xaml
index e4626f1..848194d 100644
--- a/DM_Weight/Views/EmergencyWindow.xaml
+++ b/DM_Weight/Views/EmergencyWindow.xaml
@@ -12,79 +12,99 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
+