/// <summary> /// Display an alert dialog with a summary of all failed tasks /// </summary> protected void Alert() { _controller.Invoke(delegate { if (this.getExceptions().size() == 1) { BackgroundException failure = this.getExceptions().get(0) as BackgroundException; string footer = Preferences.instance().getProperty("website.help"); if (null != failure.getPath()) { footer = Preferences.instance().getProperty("website.help") + "/" + failure.getPath().getSession().getHost().getProtocol(). getIdentifier(); } DialogResult result = _controller.WarningBox(failure.getReadableTitle(), failure.getMessage(), failure.getDetailedCauseMessage(), hasTranscript() ? this.getTranscript() : null, String.Format("{0}", Locale.localizedString("Try Again", "Alert")), true, footer); Callback(result); } else { ICollection <BackgroundException> backgroundExceptions = Utils.ConvertFromJavaList <BackgroundException>(getExceptions()); ErrorController errorController = new ErrorController(ObjectFactory.GetInstance <IErrorView>(), backgroundExceptions, getTranscript()); DialogResult result = errorController.View.ShowDialog(_controller.View); Callback(result); } }, true); }
private string GetReadableTitle(BackgroundException e) { return(e.getReadableTitle()); }