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