Skip to content

Commit 7c31711

Browse files
authored
Add version and application name to the title - Close #414 (#420)
* Close #279 - Add translator * Close #414 - Add application to title if tab is dragged out Co-authored-by: BornToBeRoot <[email protected]>
1 parent db164ff commit 7c31711

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

Source/NETworkManager/Controls/DragablzTabHostWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
1212
xmlns:wpfHelpers="clr-namespace:NETworkManager.Utilities.WPF;assembly=NETworkManager.Utilities.WPF"
1313
mc:Ignorable="d"
14-
Title="NETworkManager" Style="{DynamicResource DefaultWindow}" MinWidth="650" MinHeight="500" Height="650" Width="1000" TitleAlignment="Left"
14+
Style="{DynamicResource DefaultWindow}" MinWidth="650" MinHeight="500" Height="650" Width="1000" TitleAlignment="Left"
1515
d:DataContext="{d:DesignInstance controls:DragablzTabHostWindow}">
1616
<mahAppsControls:MetroWindow.WindowButtonCommands>
1717
<mahAppsControls:WindowButtonCommands Template="{DynamicResource MahApps.Metro.Templates.WindowButtonCommands.Win10}" />

Source/NETworkManager/Controls/DragablzTabHostWindow.xaml.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,6 @@ public ApplicationName ApplicationName
4040
OnPropertyChanged();
4141
}
4242
}
43-
44-
private string _applicationTitle;
45-
public string ApplicationTitle
46-
{
47-
get => _applicationTitle;
48-
set
49-
{
50-
if (value == _applicationTitle)
51-
return;
52-
53-
_applicationTitle = value;
54-
OnPropertyChanged();
55-
}
56-
}
5743
#endregion
5844

5945
#region Constructor
@@ -68,7 +54,7 @@ public DragablzTabHostWindow(ApplicationName applicationName)
6854

6955
InterTabController.Partition = applicationName.ToString();
7056

71-
ApplicationTitle = ApplicationNameTranslator.GetInstance().Translate(applicationName);
57+
Title = $"NETworkManager {AssemblyManager.Current.Version.Major}.{AssemblyManager.Current.Version.Minor}.{AssemblyManager.Current.Version.Build} - {ApplicationNameTranslator.GetInstance().Translate(applicationName)}";
7258

7359
SettingsManager.Current.PropertyChanged += SettingsManager_PropertyChanged;
7460
}

0 commit comments

Comments
 (0)