Skip to content

Commit

Permalink
fix crash when link is clicked (#131)
Browse files Browse the repository at this point in the history
* fix crash when link is clicked
  • Loading branch information
bNobo authored Apr 23, 2024
1 parent 92060e7 commit 1a0fec4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NeedABreak/AboutBoxWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<TextBlock VerticalAlignment="Bottom"
HorizontalAlignment="Left"
Margin="10">
<Hyperlink NavigateUri="http://www.inrs.fr/risques/travail-ecran/ce-qu-il-faut-retenir.html"
<Hyperlink NavigateUri="https://www.inrs.fr/risques/travail-ecran/ce-qu-il-faut-retenir.html"
RequestNavigate="Hyperlink_RequestNavigate"><utils:TextResource Name="inrs" /></Hyperlink>
</TextBlock>
<TextBlock x:Name="Version"
Expand Down
5 changes: 4 additions & 1 deletion NeedABreak/AboutBoxWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ private void CloseButton_Click(object sender, RoutedEventArgs e)

private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
{
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
ProcessStartInfo psi = new ProcessStartInfo(e.Uri.AbsoluteUri);
psi.UseShellExecute = true;
Process.Start(psi);

e.Handled = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion NeedABreak/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ DEBUG
</NeedABreak.Properties.Settings>
</userSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
</assemblyBinding>
</runtime>
</configuration>

0 comments on commit 1a0fec4

Please sign in to comment.