forked from sergiisyrovatchenko/SQLIndexManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathErrorBox.cs
More file actions
38 lines (29 loc) · 942 Bytes
/
Copy pathErrorBox.cs
File metadata and controls
38 lines (29 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using DevExpress.XtraEditors;
using System;
using System.Reflection;
using System.Windows.Forms;
namespace SQLIndexManager {
public partial class ErrorBox : XtraForm {
public ErrorBox(Exception ex) {
InitializeComponent();
edError.Text =
"Application has encountered an unexpected error" +
"\r\nPlease send error detail to sergey.syrovatchenko@gmail.com" +
$"\r\nBuild: {AssemblyVersion}" +
$"\r\nOS: {Environment.OSVersion}" +
$"\r\n\r\n{ex.Message}" +
$"\r\n{ex.Source}" +
$"\r\n{ex.StackTrace}";
}
private static string AssemblyVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
#region Override Methods
protected override bool ProcessDialogKey(Keys keyData) {
if (keyData == Keys.Escape) {
Close();
return true;
}
return base.ProcessDialogKey(keyData);
}
#endregion
}
}