Add report button to exception dialog

This commit is contained in:
pizzaboxer 2024-10-02 01:25:31 +01:00
parent 8ed89bb65e
commit d4d4636e8d
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
4 changed files with 15 additions and 1 deletions

View File

@ -983,6 +983,15 @@ namespace Bloxstrap.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Report exception.
/// </summary>
public static string Dialog_Exception_Report {
get {
return ResourceManager.GetString("Dialog.Exception.Report", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Bloxstrap Exception. /// Looks up a localized string similar to Bloxstrap Exception.
/// </summary> /// </summary>

View File

@ -1234,4 +1234,7 @@ Please manually delete Bloxstrap.exe from the install location or try restarting
<data name="Menu.FastFlags.Reset.Title" xml:space="preserve"> <data name="Menu.FastFlags.Reset.Title" xml:space="preserve">
<value>Reset everything to defaults</value> <value>Reset everything to defaults</value>
</data> </data>
<data name="Dialog.Exception.Report" xml:space="preserve">
<value>Report exception</value>
</data>
</root> </root>

View File

@ -41,7 +41,8 @@
<Border Grid.Row="2" Padding="15" Background="{ui:ThemeResource SolidBackgroundFillColorSecondaryBrush}"> <Border Grid.Row="2" Padding="15" Background="{ui:ThemeResource SolidBackgroundFillColorSecondaryBrush}">
<StackPanel Orientation="Horizontal" FlowDirection="LeftToRight" HorizontalAlignment="Right"> <StackPanel Orientation="Horizontal" FlowDirection="LeftToRight" HorizontalAlignment="Right">
<Button x:Name="LocateLogFileButton" Content="{x:Static resources:Strings.Common_OpenLogFile}" /> <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" /> <Button x:Name="CloseButton" MinWidth="100" Content="{x:Static resources:Strings.Common_Close}" Margin="12,0,0,0" />
</StackPanel> </StackPanel>
</Border> </Border>

View File

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