|
|
@@ -1,5 +1,6 @@
|
|
|
using System.Collections.Generic;
|
|
|
using System.Collections.ObjectModel;
|
|
|
+using System.Reflection;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
|
using System.Windows.Input;
|
|
|
@@ -28,9 +29,17 @@ public partial class MainWindow : Window
|
|
|
public MainWindow()
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
+ Title = $"NetworkTool {GetClientVersion()}";
|
|
|
Loaded += MainWindow_OnLoaded;
|
|
|
}
|
|
|
|
|
|
+ private static string GetClientVersion()
|
|
|
+ {
|
|
|
+ return Assembly.GetExecutingAssembly()
|
|
|
+ .GetCustomAttribute<AssemblyInformationalVersionAttribute>()?
|
|
|
+ .InformationalVersion.Split('+')[0] ?? "unknown";
|
|
|
+ }
|
|
|
+
|
|
|
private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadInitialState();
|