code_style: remove all IDE warnings

This commit is contained in:
leo 2024-07-14 15:55:15 +08:00
parent 9ac550242e
commit a807aa9e12
No known key found for this signature in database
94 changed files with 785 additions and 807 deletions

View file

@ -11,15 +11,16 @@ namespace SourceGit.Views
InitializeComponent();
}
private async void SelectSSHKey(object sender, RoutedEventArgs e)
private async void SelectSSHKey(object _, RoutedEventArgs e)
{
var options = new FilePickerOpenOptions() { AllowMultiple = false, FileTypeFilter = [new FilePickerFileType("SSHKey") { Patterns = ["*.*"] }] };
var toplevel = TopLevel.GetTopLevel(this);
if (toplevel == null)
return;
var options = new FilePickerOpenOptions() { AllowMultiple = false, FileTypeFilter = [new FilePickerFileType("SSHKey") { Patterns = ["*.*"] }] };
var selected = await toplevel.StorageProvider.OpenFilePickerAsync(options);
if (selected.Count == 1)
{
txtSSHKey.Text = selected[0].Path.LocalPath;
}
TxtSshKey.Text = selected[0].Path.LocalPath;
e.Handled = true;
}