SRNicoNico.ViewModels.MainWindowViewModel.Closing C# (CSharp) Method

Closing() public method

public Closing ( ) : void
return void
        public void Closing()
        {
            if(!Settings.Instance.ConfirmExit) {

                CanClose = true;
                DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() => {
                    Messenger.Raise(new WindowActionMessage(WindowAction.Close, "WindowAction"));
                }));
                return;
            }

            var message = new TransitionMessage(typeof(ExitDialog), this, TransitionMode.Modal);

            // View側がメッセージを処理し終えるまでブロックされる
            Messenger.Raise(message);
        }