Skip to content

Commit

Permalink
Added version number to startup UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Whitfield committed Dec 11, 2021
1 parent 25a6b50 commit afb3cf0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Extension build
name: NetDependencyWalker build

on:
pull_request:
Expand Down
9 changes: 9 additions & 0 deletions src/ViewModel/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -724,5 +724,14 @@ public bool FilterAssemblyVersionNode(object filterableEntity)

return node.MajorVersionMismatched || !_listOnlyMajorVersionMismatches;
}

public string VersionText
{
get
{
var version = typeof(MainWindowViewModel).Assembly.GetName().Version;
return version.Major + "." + version.Minor + "." + version.Build;
}
}
}
}
8 changes: 8 additions & 0 deletions src/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Expand All @@ -265,6 +266,13 @@
Text="Welcome to the .NET Dependency Walker" />
<TextBlock
Grid.Row="1"
FontFamily="Segoe UI"
FontSize="10">
<Run Text="Version:" />
<Run Text="{Binding VersionText, Mode=OneTime}" />
</TextBlock>
<TextBlock
Grid.Row="2"
Margin="0,4,0,0"
FontFamily="Segoe UI"
FontSize="12"
Expand Down

0 comments on commit afb3cf0

Please sign in to comment.