-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
24 lines (23 loc) · 965 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Windows.Forms;
namespace SerialNumber {
internal static class Program {
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
String serialNumber;
while (true) {
try {
ABT_SerialNumberDialog.Only.Set("01BB2-12345");
serialNumber = ABT_SerialNumberDialog.Only.ShowDialog().Equals(DialogResult.OK) ? ABT_SerialNumberDialog.Only.Get() : String.Empty;
ABT_SerialNumberDialog.Only.Hide();
_ = MessageBox.Show($"Serial # is '{serialNumber}'.", "Serial #", MessageBoxButtons.OK);
} catch (Exception e) {
_ = MessageBox.Show(e.InnerException.Message, "Oops!", MessageBoxButtons.OK);
Environment.Exit(1);
}
}
}
}
}