code_style: remove unused namespace using and run dotnet format

This commit is contained in:
leo 2024-08-28 13:42:25 +08:00
parent 4bcdd0ade4
commit 3ea80d99f1
No known key found for this signature in database
9 changed files with 10 additions and 11 deletions

View file

@ -98,7 +98,7 @@ namespace SourceGit
public static void OpenDialog(Window window) public static void OpenDialog(Window window)
{ {
if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner}) if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner })
window.ShowDialog(owner); window.ShowDialog(owner);
} }

View file

@ -27,7 +27,7 @@ namespace SourceGit.Views
} }
catch (Exception exception) catch (Exception exception)
{ {
App.RaiseException(string.Empty, $"Failed to select location: {exception.Message}"); App.RaiseException(string.Empty, $"Failed to select location: {exception.Message}");
} }
e.Handled = true; e.Handled = true;

View file

@ -6,7 +6,6 @@ using Avalonia;
using Avalonia.Collections; using Avalonia.Collections;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Controls.Documents; using Avalonia.Controls.Documents;
using Avalonia.Controls.Primitives;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Media; using Avalonia.Media;
@ -689,7 +688,7 @@ namespace SourceGit.Views
private void OnCommitListKeyDown(object sender, KeyEventArgs e) private void OnCommitListKeyDown(object sender, KeyEventArgs e)
{ {
if (sender is ListBox { SelectedItems: { Count : > 0 } selected } && if (sender is ListBox { SelectedItems: { Count: > 0 } selected } &&
e.Key == Key.C && e.Key == Key.C &&
e.KeyModifiers.HasFlag(KeyModifiers.Control)) e.KeyModifiers.HasFlag(KeyModifiers.Control))
{ {