BudgetAnalyser.LedgerBook.LedgerTransactionsController.OnShellDialogResponseReceived C# (CSharp) Метод

OnShellDialogResponseReceived() приватный Метод

private OnShellDialogResponseReceived ( ShellDialogResponseMessage message ) : void
message BudgetAnalyser.ShellDialog.ShellDialogResponseMessage
Результат void
        private void OnShellDialogResponseReceived(ShellDialogResponseMessage message)
        {
            if (!message.IsItForMe(this.dialogCorrelationId))
            {
                return;
            }

            if (message.Response == ShellDialogButton.Ok)
            {
                if (ShowAddingNewTransactionPanel)
                {
                    OnAddNewTransactionCommandExecuted();
                }

                Save();
                this.entryLine = null;
                LedgerEntry = null;
            }

            if (message.Response == ShellDialogButton.Cancel)
            {
                this.isAddDirty = false;
                this.entryLine = null;
                LedgerEntry = null;
            }

            EventHandler<LedgerTransactionEventArgs> handler = Complete;
            handler?.Invoke(this, new LedgerTransactionEventArgs(this.wasChanged));

            Reset();
            this.wasChanged = false;
        }