private void ShellVM_ClosingRequest(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (ShellClosingEventHandlers == null)
            {
                return;
            }

            var args = new ShellClosingEventArgs(e);

            foreach (var handler in ShellClosingEventHandlers)
            {
                handler.Handle(args);
                if (args.Handled)
                {
                    break;
                }
            }
        }
        public void Handle(ShellClosingEventArgs args)
        {
            if (args == null)
            {
                return;
            }

            if (CaseService.Current.CurrentCase != null)
            {
                var res = MsgBoxService.Show(LanguageService.FindResourceString(Constants.MsgText_ConfirmToCloseCurrentCase), MessageBoxButton.YesNo);
                if (res != MessageBoxResult.Yes)
                {
                    args.CancelEventArgs.Cancel = true;
                }
                else
                {
                    CaseService.Current.CloseCurrentCase();
                }
                args.Handled = true;
            }
        }