summaryrefslogtreecommitdiff
path: root/grapher/AboutBox.cs
diff options
context:
space:
mode:
authora1xd <[email protected]>2020-12-05 21:28:08 -0500
committerGitHub <[email protected]>2020-12-05 21:28:08 -0500
commitc8503654da5bc40a129e58914549cd394349d059 (patch)
treee4760c579597d0e292c7b03dff95d19bb8f3c750 /grapher/AboutBox.cs
parentMerge pull request #45 from JacobPalecki/fix (diff)
parentupdate signed, add installers (diff)
downloadrawaccel-c8503654da5bc40a129e58914549cd394349d059.tar.xz
rawaccel-c8503654da5bc40a129e58914549cd394349d059.zip
Merge pull request #46 from a1xd/1.3
Diffstat (limited to 'grapher/AboutBox.cs')
-rw-r--r--grapher/AboutBox.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/grapher/AboutBox.cs b/grapher/AboutBox.cs
new file mode 100644
index 0000000..5547c59
--- /dev/null
+++ b/grapher/AboutBox.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Linq;
+using System.Reflection;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace grapher
+{
+ partial class AboutBox : Form
+ {
+ public AboutBox(Version driver)
+ {
+ InitializeComponent();
+ this.Text = String.Format("About {0}", AssemblyTitle);
+ this.labelVersion.Text = String.Format("GUI Version {0}", AssemblyVersion);
+ this.labelDriverVersion.Text = String.Format("Driver Version {0}", driver.ToString());
+ }
+
+ #region Assembly Attribute Accessors
+
+ public string AssemblyTitle
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
+ if (attributes.Length > 0)
+ {
+ AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
+ if (titleAttribute.Title != "")
+ {
+ return titleAttribute.Title;
+ }
+ }
+ return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
+ }
+ }
+
+ public string AssemblyVersion
+ {
+ get
+ {
+ return Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ }
+ }
+
+ #endregion
+ }
+}