mirror of
https://github.com/ReneLergner/WPinternals.git
synced 2026-06-19 13:50:11 +10:00
Project Maintenance
This commit is contained in:
@@ -36,23 +36,30 @@ namespace WPinternals
|
||||
|
||||
private void HandleHyperlinkClick(object sender, RoutedEventArgs args)
|
||||
{
|
||||
Hyperlink link = args.Source as Hyperlink;
|
||||
if (link != null)
|
||||
if (args.Source is Hyperlink link)
|
||||
{
|
||||
if (link.NavigateUri.ToString() == "UnlockBoot")
|
||||
(this.DataContext as LumiaFlashRomSourceSelectionViewModel).SwitchToUnlockBoot();
|
||||
{
|
||||
(this.DataContext as LumiaFlashRomSourceSelectionViewModel)?.SwitchToUnlockBoot();
|
||||
}
|
||||
else if (link.NavigateUri.ToString() == "UnlockRoot")
|
||||
(this.DataContext as LumiaFlashRomSourceSelectionViewModel).SwitchToUnlockRoot();
|
||||
{
|
||||
(this.DataContext as LumiaFlashRomSourceSelectionViewModel)?.SwitchToUnlockRoot();
|
||||
}
|
||||
else if (link.NavigateUri.ToString() == "Dump")
|
||||
(this.DataContext as LumiaFlashRomSourceSelectionViewModel).SwitchToDumpFFU();
|
||||
{
|
||||
(this.DataContext as LumiaFlashRomSourceSelectionViewModel)?.SwitchToDumpFFU();
|
||||
}
|
||||
else if (link.NavigateUri.ToString() == "Backup")
|
||||
(this.DataContext as LumiaFlashRomSourceSelectionViewModel).SwitchToBackup();
|
||||
{
|
||||
(this.DataContext as LumiaFlashRomSourceSelectionViewModel)?.SwitchToBackup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
private void FilePicker_PathChanged(object sender, PathChangedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user