rawaccel/grapher/AboutBox.cs
a1xd 1964548acb port to .NET 5
dependency changes
  - Newtonsoft.JSON
  + System.Windows.Forms.DataVisualization
  + System.Data.SqlClient (indirect, but was not added automatically by NuGet)

added ARM64 target
2021-09-09 17:28:10 -04:00

51 lines
1.5 KiB
C#

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 static 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().Location);
}
}
public static string AssemblyVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
#endregion
}
}