add version text to the exception dialog

This commit is contained in:
bluepilledgreat 2024-10-17 15:25:22 +01:00
parent a52a9b4ee8
commit 2e969d72c2
4 changed files with 23 additions and 5 deletions

View File

@ -974,6 +974,15 @@ namespace Bloxstrap.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Version {0}.
/// </summary>
public static string Dialog_Exception_Version {
get {
return ResourceManager.GetString("Dialog.Exception.Version", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The chosen bootstrapper icon could not be loaded.
///

View File

@ -1236,4 +1236,7 @@ Would you like to enable test mode?</value>
<value>Icons</value>
<comment>Name of the folder that gets created according to the "create shortcut icons" option. Ensure that it is a valid folder name.</comment>
</data>
<data name="Dialog.Exception.Version" xml:space="preserve">
<value>Version {0}</value>
</data>
</root>

View File

@ -40,11 +40,15 @@
</Grid>
<Border Grid.Row="2" Padding="15" Background="{ui:ThemeResource SolidBackgroundFillColorSecondaryBrush}">
<StackPanel Orientation="Horizontal" FlowDirection="LeftToRight" HorizontalAlignment="Right">
<Button x:Name="ReportExceptionButton" Content="{x:Static resources:Strings.Dialog_Exception_Report}" />
<Button x:Name="LocateLogFileButton" Content="{x:Static resources:Strings.Common_OpenLogFile}" Margin="12,0,0,0" />
<Button x:Name="CloseButton" MinWidth="100" Content="{x:Static resources:Strings.Common_Close}" Margin="12,0,0,0" />
</StackPanel>
<Grid>
<TextBlock x:Name="VersionText" VerticalAlignment="Bottom" HorizontalAlignment="Left" Foreground="{DynamicResource TextFillColorTertiaryBrush}" Text="Version 2.8.0" />
<StackPanel Orientation="Horizontal" FlowDirection="LeftToRight" HorizontalAlignment="Right">
<Button x:Name="ReportExceptionButton" Content="{x:Static resources:Strings.Dialog_Exception_Report}" />
<Button x:Name="LocateLogFileButton" Content="{x:Static resources:Strings.Common_OpenLogFile}" Margin="12,0,0,0" />
<Button x:Name="CloseButton" MinWidth="100" Content="{x:Static resources:Strings.Common_Close}" Margin="12,0,0,0" />
</StackPanel>
</Grid>
</Border>
</Grid>
</base:WpfUiWindow>

View File

@ -40,6 +40,8 @@ namespace Bloxstrap.UI.Elements.Dialogs
helpMessage = String.Format(Strings.Dialog_Exception_Info_2_Alt, wikiUrl);
HelpMessageMDTextBlock.MarkdownText = helpMessage;
VersionText.Text = String.Format(Strings.Dialog_Exception_Version, App.Version);
ReportExceptionButton.Click += (_, _) => Utilities.ShellExecute(issueUrl);
LocateLogFileButton.Click += delegate