public Task ShowError(string message, string title, string buttonText, Action afterHideCallback)
        {
            CheckWindow();
            var tcs     = new TaskCompletionSource <bool>();
            var closing = false;

            _window.SetMessageInfo(
                new MessageInfo(message, title, true)
            {
                ConfirmButtonText = buttonText,
                Callback          = r =>
                {
                    if (closing)
                    {
                        return;
                    }

                    closing = true;
                    tcs.SetResult(true);
                    afterHideCallback?.Invoke();
                }
            });

            return(tcs.Task);
        }