Skip to content

Commit 3a42ab2

Browse files
committed
Updated title bar to put app name and version before log names
1 parent 44ff821 commit 3a42ab2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/EventLogExpert.UI.Tests/Services/AppTitleServiceTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void SetIsPrerelease_WhenAdminAndPrerelease_ShouldSetTitle()
3030

3131
// Assert
3232
mockTitleProvider.Received(1)
33-
.SetTitle($"{Constants.LogName} - {Constants.AppName} (Preview) {Constants.AppInstalledVersion} (Admin)");
33+
.SetTitle($"{Constants.AppName} (Preview) {Constants.AppInstalledVersion} (Admin) - {Constants.LogName}");
3434
}
3535

3636
[Fact]
@@ -52,7 +52,7 @@ public void SetIsPrerelease_WhenLogName_ShouldSetTitle()
5252

5353
// Assert
5454
mockTitleProvider.Received(1)
55-
.SetTitle($"{Constants.LogName} - {Constants.AppName} (Preview) {Constants.AppInstalledVersion}");
55+
.SetTitle($"{Constants.AppName} (Preview) {Constants.AppInstalledVersion} - {Constants.LogName}");
5656
}
5757

5858
[Fact]
@@ -96,7 +96,7 @@ public void SetLogName_WhenAdminAndLogName_ShouldSetTitle()
9696

9797
// Assert
9898
mockTitleProvider.Received(1)
99-
.SetTitle($"{Constants.LogName} - {Constants.AppName} {Constants.AppInstalledVersion} (Admin)");
99+
.SetTitle($"{Constants.AppName} {Constants.AppInstalledVersion} (Admin) - {Constants.LogName}");
100100
}
101101

102102
[Fact]
@@ -138,7 +138,7 @@ public void SetLogName_WhenLogName_ShouldSetTitle()
138138

139139
// Assert
140140
mockTitleProvider.Received(1)
141-
.SetTitle($"{Constants.LogName} - {Constants.AppName} {Constants.AppInstalledVersion}");
141+
.SetTitle($"{Constants.AppName} {Constants.AppInstalledVersion} - {Constants.LogName}");
142142
}
143143

144144
[Fact]
@@ -266,7 +266,7 @@ public void SetProgressString_WhenProgressAndLogName_ShouldSetTitleWithBoth()
266266
// Assert
267267
mockTitleProvider.Received(1)
268268
.SetTitle(
269-
$"{Constants.Percentage} - {Constants.LogName} - {Constants.AppName} {Constants.AppInstalledVersion}");
269+
$"{Constants.Percentage} - {Constants.AppName} {Constants.AppInstalledVersion} - {Constants.LogName}");
270270
}
271271

272272
private static AppTitleService CreateAppTitleService(

src/EventLogExpert.UI/Services/AppTitleService.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ private void SetTitle()
4646
title.Append($"{_progressString} - ");
4747
}
4848

49-
if (_logName is not null)
50-
{
51-
title.Append($"{_logName} - ");
52-
}
53-
5449
title.Append("EventLogExpert");
5550

5651
if (versionProvider.IsDevBuild)
@@ -71,6 +66,11 @@ private void SetTitle()
7166
title.Append(" (Admin)");
7267
}
7368

69+
if (_logName is not null)
70+
{
71+
title.Append($" - {_logName}");
72+
}
73+
7474
titleProvider.SetTitle(title.ToString());
7575
}
7676
}

0 commit comments

Comments
 (0)