Project Maintenance

This commit is contained in:
Gustave Monce
2021-08-09 20:21:09 +02:00
parent 9865ef7f79
commit 847ce0506d
411 changed files with 5922 additions and 54941 deletions
+2 -3
View File
@@ -37,8 +37,7 @@ namespace WPinternals
private void HandleHyperlinkClick(object sender, RoutedEventArgs args)
{
Hyperlink link = args.Source as Hyperlink;
if (link != null)
if (args.Source is Hyperlink link)
{
Process.Start(link.NavigateUri.ToString());
}
@@ -46,7 +45,7 @@ namespace WPinternals
private void Document_Loaded(object sender, RoutedEventArgs e)
{
(sender as FlowDocument).AddHandler(Hyperlink.ClickEvent, new RoutedEventHandler(HandleHyperlinkClick));
(sender as FlowDocument)?.AddHandler(Hyperlink.ClickEvent, new RoutedEventHandler(HandleHyperlinkClick));
}
}
}