From af4375b60e194513524340e05a5c03df749a6712 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 20 May 2025 21:42:16 +0800 Subject: [PATCH] Improve code quality --- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index e77d6f899..01517522d 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -114,10 +114,11 @@ namespace Flow.Launcher } } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")] private async void btnTips_Click(object sender, RoutedEventArgs e) { - string tipText = (string)Application.Current.Resources["fileManager_files_tips"]; - string url = "https://files.community/docs/contributing/updates"; + var tipText = (string)Application.Current.Resources["fileManager_files_tips"]; + var url = "https://files.community/docs/contributing/updates"; var textBlock = new TextBlock { @@ -128,7 +129,7 @@ namespace Flow.Launcher textBlock.Inlines.Add(tipText); - Hyperlink hyperlink = new Hyperlink + var hyperlink = new Hyperlink { NavigateUri = new Uri(url) }; @@ -147,7 +148,7 @@ namespace Flow.Launcher var tipsDialog = new ContentDialog() { - Owner = Window.GetWindow(sender as DependencyObject), + Owner = Window.GetWindow((DependencyObject)sender), Title = (string)Application.Current.Resources["fileManager_files_btn"], Content = textBlock, PrimaryButtonText = (string)Application.Current.Resources["commonOK"],