Esempio n. 1
0
        public static DialogResult ShowErrorBox(string textBody, string mainText, string caption, string details)
        {
#if WIN
            var td = new TaskDialog();
            td.Text            = textBody;
            td.InstructionText = mainText;
            td.Caption         = caption;

            td.DetailsExpanded     = false;
            td.DetailsExpandedText = details;
            td.ExpansionMode       = TaskDialogExpandedDetailsLocation.ExpandFooter;

            td.Icon            = TaskDialogStandardIcon.Error;
            td.FooterIcon      = TaskDialogStandardIcon.Information;
            td.StandardButtons = TaskDialogStandardButtons.Ok;

            return(td.Show().ToDR());
#else
            string   msg = mainText + "\n\n" + textBody;
            ErrorBox eb  = new ErrorBox(msg, caption, details);
            return(eb.ShowDialog());
#endif
        }
Esempio n. 2
0
        public static ErrorBox ShowErrorBox(string textBody, string mainText, string details)
        {
            ErrorBox eb = new ErrorBox(textBody, mainText, details);

            return(eb);
        }