diff --git a/DM_Weight/ViewModels/EmergencyWindowViewModel.cs b/DM_Weight/ViewModels/EmergencyWindowViewModel.cs index 12bee58..f41c762 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; @@ -52,6 +53,13 @@ namespace DM_Weight.ViewModels } ); } + private DelegateCommand? _exitCommand; + public DelegateCommand ExitCommand => _exitCommand ??= new DelegateCommand(Exit); + void Exit() + { + Process.GetCurrentProcess().Kill(); + Environment.Exit(0); + } public DelegateCommand ReturnLoginDelegate { get => new DelegateCommand(() =>