1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-23 22:30:09 +00:00

Add time delay for pop out process

This commit is contained in:
hawkeye 2023-09-09 17:35:17 -04:00
parent 65f32c1ccc
commit 11b3134994
7 changed files with 23 additions and 25 deletions

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.DomainModel</RootNamespace>
<Platforms>x64</Platforms>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<Version>4.0.2.8</Version>
<AssemblyVersion>4.0.2.8</AssemblyVersion>
<FileVersion>4.0.2.8</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations>

View file

@ -14,9 +14,9 @@
<RootNamespace>MSFSPopoutPanelManager.MainApp</RootNamespace>
<ApplicationIcon>logo.ico</ApplicationIcon>
<Platforms>x64</Platforms>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<Version>4.0.2.8</Version>
<AssemblyVersion>4.0.2.8</AssemblyVersion>
<FileVersion>4.0.2.8</FileVersion>
<DebugType>embedded</DebugType>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<!-- Publishing options -->

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.Orchestration</RootNamespace>
<Platforms>x64</Platforms>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<Version>4.0.2.8</Version>
<AssemblyVersion>4.0.2.8</AssemblyVersion>
<FileVersion>4.0.2.8</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations>

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.Shared</RootNamespace>
<Platforms>x64</Platforms>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<Version>4.0.2.8</Version>
<AssemblyVersion>4.0.2.8</AssemblyVersion>
<FileVersion>4.0.2.8</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations>

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.SimConnectAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<Version>4.0.2.8</Version>
<AssemblyVersion>4.0.2.8</AssemblyVersion>
<FileVersion>4.0.2.8</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations>

View file

@ -49,23 +49,20 @@ namespace MSFSPopoutPanelManager.WindowsAgent
Debug.WriteLine($"Pop out panel at: {x}/{y} ...");
PInvoke.SetForegroundWindow(WindowProcessManager.SimulatorProcess.Handle);
Thread.Sleep(200);
Thread.Sleep(250);
MoveAppWindowFromLeftClickPoint(x, y);
LeftClick(x, y);
// Force cursor reset
PInvoke.SetCursorPos(x + 1, y);
Thread.Sleep(100);
PInvoke.SetCursorPos(x, y);
Thread.Sleep(300);
// Force cursor reset and focus (doubling to make sure)
LeftClick(x, y);
if (useSecondaryKeys)
{
InputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.LCONTROL);
InputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.RCONTROL);
Thread.Sleep(300);
PInvoke.mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
Thread.Sleep(200);
PInvoke.mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
@ -82,6 +79,7 @@ namespace MSFSPopoutPanelManager.WindowsAgent
else
{
InputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.RMENU);
Thread.Sleep(300);
PInvoke.mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
Thread.Sleep(200);
PInvoke.mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.WindowsAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<Version>4.0.2.8</Version>
<AssemblyVersion>4.0.2.8</AssemblyVersion>
<FileVersion>4.0.2.8</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations>