Skip to content

Commit

Permalink
fix crash when link is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
bNobo committed Apr 22, 2024
1 parent 92060e7 commit 34384b0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 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
9 changes: 9 additions & 0 deletions NeedABreak/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions NeedABreak/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
<data name="inrs" xml:space="preserve">
<value>INRS</value>
</data>
<data name="inrs_url" xml:space="preserve">
<value>https://www.inrs.fr/risques/travail-ecran/ce-qu-il-faut-retenir.html</value>
</data>
<data name="Less_than_a_minute_before_locking" xml:space="preserve">
<value>Moins d'une minute avant verrouillage</value>
</data>
Expand Down

0 comments on commit 34384b0

Please sign in to comment.