Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
heftymouse committed Jun 7, 2023
2 parents a23ba41 + a342c29 commit 769ab9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class SeerProProvider : IPreviewPopupProvider
{
public static SeerProProvider Instance { get; } = new();

private string? CurrentPath;

public async Task TogglePreviewPopup(string path)
{
HWND Window = User32.FindWindow("SeerWindowClass", null);
Expand All @@ -26,11 +28,14 @@ public async Task TogglePreviewPopup(string path)
data.cbData = (path.Length + 1) * 2;
data.lpData = Marshal.StringToHGlobalUni(path);
User32.SendMessage(Window, (uint)User32.WindowMessage.WM_COPYDATA, 0, ref data);

CurrentPath = User32.IsWindowVisible(Window) ? path : null;
}

public async Task SwitchPreview(string path)
{
// TODO
if (CurrentPath is not null && path != CurrentPath)
await TogglePreviewPopup(path);
}

public async Task<bool> DetectAvailability()
Expand Down
2 changes: 1 addition & 1 deletion tests/Files.InteractionTests/Files.InteractionTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="4.4.5" />
<PackageReference Include="Axe.Windows" Version="2.1.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.4" />
</ItemGroup>
Expand Down

0 comments on commit 769ab9c

Please sign in to comment.