Skip to content

Commit b13cb75

Browse files
committed
Code quality
1 parent 6404f23 commit b13cb75

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

Flow.Launcher/QuickSwitch/NativeHelper.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ namespace Flow.Launcher.QuickSwitch
66
{
77
public static class NativeHelper
88
{
9-
10-
119
public const uint WINEVENT_OUTOFCONTEXT = 0;
1210
public const uint EVENT_SYSTEM_FOREGROUND = 3;
1311

Flow.Launcher/QuickSwitch/QuickSwitch.cs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using Flow.Launcher.Helper;
1+
using System;
2+
using System.IO;
3+
using System.Runtime.InteropServices;
4+
using Flow.Launcher.Helper;
25
using Flow.Launcher.Infrastructure.Hotkey;
36
using Flow.Launcher.Infrastructure.Logger;
47
using Interop.UIAutomationClient;
58
using SHDocVw;
69
using Shell32;
7-
using System;
8-
using System.IO;
9-
using System.Runtime.InteropServices;
1010
using WindowsInput;
1111
using WindowsInput.Native;
1212
using static Flow.Launcher.QuickSwitch.NativeHelper;
@@ -45,12 +45,12 @@ private static void NavigateDialogPath(IUIAutomationElement window)
4545
{
4646
return;
4747
}
48-
object? document;
48+
object document;
4949
try
5050
{
5151
document = lastExplorerView?.Document;
5252
}
53-
catch (COMException e)
53+
catch (COMException)
5454
{
5555
return;
5656
}
@@ -61,7 +61,6 @@ private static void NavigateDialogPath(IUIAutomationElement window)
6161
if (!Path.IsPathRooted(path))
6262
return;
6363

64-
6564
_inputSimulator.Keyboard.ModifiedKeyStroke(VirtualKeyCode.MENU, VirtualKeyCode.VK_D);
6665

6766
var address = dialog.FindFirst(TreeScope.TreeScope_Subtree, _automation.CreateAndCondition(
@@ -77,9 +76,7 @@ private static void NavigateDialogPath(IUIAutomationElement window)
7776
var edit = (IUIAutomationValuePattern)address.GetCurrentPattern(UIA_PatternIds.UIA_ValuePatternId);
7877
edit.SetValue(path);
7978

80-
SendMessage(address.CurrentNativeWindowHandle, NativeHelper.WmType.WM_KEYDOWN, (nuint)VirtualKeyCode.RETURN, IntPtr.Zero);
81-
82-
79+
SendMessage(address.CurrentNativeWindowHandle, WmType.WM_KEYDOWN, (nuint)VirtualKeyCode.RETURN, IntPtr.Zero);
8380
}
8481

8582
[UnmanagedCallersOnly]
@@ -115,8 +112,7 @@ private static void WindowSwitch(IntPtr hWinEventHook, uint eventType, IntPtr hw
115112
continue;
116113
}
117114
lastExplorerView = explorer;
118-
119115
}
120116
}
121117
}
122-
}
118+
}

0 commit comments

Comments
 (0)