mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-04-20 11:36:14 +00:00
Squashed commit of the following: commit db54f752b1a7d876c8e8ac23f64fac0e133c6c42 Author: jvyden <jvyden@jvyden.xyz> Date: Tue Jun 14 21:50:24 2022 -0400 Fix warnings in Program.cs, remove version commit abab75e00a9fa5c762669365a130025b7fa28522 Author: jvyden <jvyden@jvyden.xyz> Date: Tue Jun 14 21:45:08 2022 -0400 Enforce file-scoped namespaces commit d004b8dd77546b0dedc572bc3e7849677a707697 Author: jvyden <jvyden@jvyden.xyz> Date: Tue Jun 14 21:43:53 2022 -0400 Cleanup remote patching commit d611df7e2e5ad86466acb3fe95b835e5df3efa38 Author: jvyden <jvyden@jvyden.xyz> Date: Tue Jun 14 21:25:57 2022 -0400 Theoretically working state commit 18b362e268d800bac3c6fa5c3ae0c0b896627648 Author: jvyden <jvyden@jvyden.xyz> Date: Tue Jun 14 21:10:58 2022 -0400 Import code from UnionRemotePatcher Co-authored-by: Logan Lowe <loganr.lowe@gmail.com>
47 lines
No EOL
1.1 KiB
C#
47 lines
No EOL
1.1 KiB
C#
using Eto.Drawing;
|
|
using Eto.Forms;
|
|
using LBPUnion.UnionPatcher.Gui.Forms;
|
|
|
|
namespace LBPUnion.UnionPatcher.Gui;
|
|
|
|
public static class Gui {
|
|
public static void Show() {
|
|
new Application().Run(new ModeSelectionForm());
|
|
}
|
|
|
|
public static Dialog CreateOkDialog(string title, string errorMessage) {
|
|
DynamicLayout layout = new();
|
|
Button button;
|
|
|
|
layout.Spacing = new Size(5, 5);
|
|
layout.MinimumSize = new Size(350, 100);
|
|
|
|
layout.BeginHorizontal();
|
|
layout.Add(new Label {
|
|
Text = errorMessage,
|
|
});
|
|
|
|
layout.BeginHorizontal();
|
|
layout.BeginVertical();
|
|
layout.Add(null);
|
|
layout.Add(button = new Button {
|
|
Text = "OK",
|
|
});
|
|
|
|
layout.EndVertical();
|
|
layout.EndHorizontal();
|
|
layout.EndHorizontal();
|
|
|
|
Dialog dialog = new() {
|
|
Content = layout,
|
|
Padding = new Padding(10, 10, 10, 10),
|
|
Title = title,
|
|
};
|
|
|
|
button.Click += delegate {
|
|
dialog.Close();
|
|
};
|
|
|
|
return dialog;
|
|
}
|
|
} |