-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAboutWindow.xaml.cs
More file actions
35 lines (32 loc) · 1011 Bytes
/
AboutWindow.xaml.cs
File metadata and controls
35 lines (32 loc) · 1011 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
using System.Diagnostics;
using System.Reflection;
using System.Windows;
using System.Windows.Navigation;
namespace NMEA2000Analyzer
{
public partial class AboutWindow : Window
{
public AboutWindow()
{
InitializeComponent();
ShowVersion();
}
private void CloseButton_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true });
e.Handled = true;
}
private void ShowVersion()
{
var version = Assembly.GetExecutingAssembly().GetName().Version;
if (version != null)
{
versionTextBlock.Text = $"Version {version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
}
}
}
}