forked from sergiisyrovatchenko/SQLIndexManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathErrorForm.cs
More file actions
43 lines (36 loc) · 1.25 KB
/
Copy pathErrorForm.cs
File metadata and controls
43 lines (36 loc) · 1.25 KB
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
39
40
41
42
43
using System.Reflection;
using DevExpress.XtraEditors;
using System.Windows.Forms;
using System;
namespace SQLIndexManager {
public partial class ErrorForm : XtraForm {
public ErrorForm(Exception ex) {
InitializeComponent();
edError.Text = $"Applicatin has encountered an unexpected error." +
$" \r\nPlease send error detail to dbmole@dmail.com" +
$" \r\n\r\n{ex.Message}" +
$" \r\n{ex.Source}" +
$" \r\n{ex.StackTrace}";
}
private static string AssemblyVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
private static string AssemblyProduct {
get {
var att = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
return ((AssemblyProductAttribute)att[0]).Product;
}
}
private static string AssemblyCopyright {
get {
var att = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
return ((AssemblyCopyrightAttribute)att[0]).Copyright;
}
}
protected override bool ProcessDialogKey(Keys keyData) {
if (keyData == Keys.Escape) {
Close();
return true;
}
return base.ProcessDialogKey(keyData);
}
}
}