GtkDialog.cs 794 B

1234567891011121314151617181920212223
  1. using Gtk;
  2. using System.Reflection;
  3. namespace Ryujinx.Ui
  4. {
  5. internal class GtkDialog
  6. {
  7. internal static void CreateErrorDialog(string errorMessage)
  8. {
  9. MessageDialog errorDialog = new MessageDialog(null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, null)
  10. {
  11. Title = "Ryujinx - Error",
  12. Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.Icon.png"),
  13. Text = "Ryujinx has encountered an error",
  14. SecondaryText = errorMessage,
  15. WindowPosition = WindowPosition.Center
  16. };
  17. errorDialog.SetSizeRequest(100, 20);
  18. errorDialog.Run();
  19. errorDialog.Dispose();
  20. }
  21. }
  22. }