From c1cd6664a4479ff2210d2461dac5ad84c514bb75 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Thu, 14 Jan 2021 12:44:57 -0500 Subject: show custom dialog on bad input (#63) * show custom dialog on bad input fixes #62 * Update MessageDialog constructor args --- grapher/MessageDialog.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 grapher/MessageDialog.cs (limited to 'grapher/MessageDialog.cs') diff --git a/grapher/MessageDialog.cs b/grapher/MessageDialog.cs new file mode 100644 index 0000000..0e153f8 --- /dev/null +++ b/grapher/MessageDialog.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace grapher +{ + public partial class MessageDialog : Form + { + public MessageDialog(string message, string title = "") + { + InitializeComponent(); + Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); + Text = title; + messageLabel.Text = message; + } + + } +} -- cgit v1.2.3