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
+6 -6
View File
@@ -34,25 +34,25 @@ namespace WPinternals
InitializeComponent();
// Setting these properties in XAML results in an error. Why?
GifImage.GifSource = @"/aerobusy.gif";
GifImage.GifSource = "/aerobusy.gif";
GifImage.AutoStart = true;
}
private void HandleHyperlinkClick(object sender, RoutedEventArgs args)
{
Hyperlink link = args.Source as Hyperlink;
if ((link != null) && (link.NavigateUri != null))
if (link?.NavigateUri != null)
{
if (link.NavigateUri.ToString() == "GettingStarted")
(this.DataContext as NokiaBootloaderViewModel).SwitchToGettingStarted();
(this.DataContext as NokiaBootloaderViewModel).RebootTo(link.NavigateUri.ToString());
{
(this.DataContext as NokiaBootloaderViewModel)?.SwitchToGettingStarted();
} (this.DataContext as NokiaBootloaderViewModel)?.RebootTo(link.NavigateUri.ToString());
}
}
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));
}
}
}