示例#1
0
        public Dialogs(
            ShowProgressDialog showProgress,
            ShowErrorDialog showError,
            ShowInfoDialog showInfo,
            ShowConfirmDialog showConfirm)
        {
            if (showProgress == null)
            {
                throw new ArgumentNullException(nameof(showProgress));
            }
            if (showError == null)
            {
                throw new ArgumentNullException(nameof(showError));
            }
            if (showInfo == null)
            {
                throw new ArgumentNullException(nameof(showInfo));
            }
            if (showConfirm == null)
            {
                throw new ArgumentNullException(nameof(showConfirm));
            }

            ShowProgress = showProgress;
            ShowError    = showError;
            ShowInfo     = showInfo;
            ShowConfirm  = showConfirm;
        }
        public static void HandleError(String message, Exception exception)
        {
            var errorDialog = new ShowErrorDialog(message, exception);

            errorDialog.ShowDialog();
        }