140
140
#region ShowException
141
public static void ShowException (Exception e, string primaryText)
143
ShowException (RootWindow, e, primaryText);
146
142
public static void ShowException (Exception e)
148
144
ShowException (RootWindow, e);
147
public static void ShowException (Exception e, string message)
149
ShowException (RootWindow, e, message);
152
public static void ShowException (Exception e, string message, string title)
154
ShowException (RootWindow, e, message, title);
157
public static AlertButton ShowException (Exception e, string message, string title, params AlertButton[] buttons)
159
return ShowException (RootWindow, e, message, title, buttons);
151
162
public static void ShowException (Gtk.Window parent, Exception e)
153
164
ShowException (RootWindow, e, e.Message);
156
public static void ShowException (Gtk.Window parent, Exception e, string primaryText)
158
messageService.ShowException (parent, e, primaryText);
167
public static void ShowException (Gtk.Window parent, Exception e, string message)
169
ShowException (parent, e, message, null);
172
public static void ShowException (Gtk.Window parent, Exception e, string message, string title)
174
ShowException (parent, e, message, title, null);
177
public static AlertButton ShowException (Gtk.Window parent, Exception e, string message, string title, params AlertButton[] buttons)
179
return messageService.ShowException (parent, title, message, e, buttons);
410
431
//The real GTK# code is wrapped in a GuiSyncObject to make calls synchronous on the GUI thread
411
432
private class InternalMessageService : GuiSyncObject
413
public void ShowException (Gtk.Window parent, Exception e, string primaryText)
434
public AlertButton ShowException (Gtk.Window parent, string title, string message, Exception e, params AlertButton[] buttons)
415
436
var exceptionDialog = new ExceptionDialog () {
416
Message = primaryText,
437
Buttons = buttons ?? new AlertButton[] { AlertButton.Ok },
438
Title = title ?? GettextCatalog.GetString ("An error has occurred"),
418
441
TransientFor = parent,
420
443
exceptionDialog.Run ();
444
return exceptionDialog.ResultButton;
423
447
public AlertButton GenericAlert (MessageDescription message)