1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-10-16 06:00:45 +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> <PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.DomainModel</RootNamespace> <RootNamespace>MSFSPopoutPanelManager.DomainModel</RootNamespace>
<Platforms>x64</Platforms> <Platforms>x64</Platforms>
<Version>4.0.2.7</Version> <Version>4.0.2.8</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion> <AssemblyVersion>4.0.2.8</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion> <FileVersion>4.0.2.8</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType> <DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>

View file

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

View file

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

View file

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

View file

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

View file

@ -49,23 +49,20 @@ namespace MSFSPopoutPanelManager.WindowsAgent
Debug.WriteLine($"Pop out panel at: {x}/{y} ..."); Debug.WriteLine($"Pop out panel at: {x}/{y} ...");
PInvoke.SetForegroundWindow(WindowProcessManager.SimulatorProcess.Handle); PInvoke.SetForegroundWindow(WindowProcessManager.SimulatorProcess.Handle);
Thread.Sleep(200); Thread.Sleep(250);
MoveAppWindowFromLeftClickPoint(x, y); MoveAppWindowFromLeftClickPoint(x, y);
LeftClick(x, y); LeftClick(x, y);
// Force cursor reset // Force cursor reset and focus (doubling to make sure)
PInvoke.SetCursorPos(x + 1, y); LeftClick(x, y);
Thread.Sleep(100);
PInvoke.SetCursorPos(x, y);
Thread.Sleep(300);
if (useSecondaryKeys) if (useSecondaryKeys)
{ {
InputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.LCONTROL); InputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.LCONTROL);
InputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.RCONTROL); InputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.RCONTROL);
Thread.Sleep(300);
PInvoke.mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0); PInvoke.mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
Thread.Sleep(200); Thread.Sleep(200);
PInvoke.mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0); PInvoke.mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
@ -82,6 +79,7 @@ namespace MSFSPopoutPanelManager.WindowsAgent
else else
{ {
InputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.RMENU); InputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.RMENU);
Thread.Sleep(300);
PInvoke.mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0); PInvoke.mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
Thread.Sleep(200); Thread.Sleep(200);
PInvoke.mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0); 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> <PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.WindowsAgent</RootNamespace> <RootNamespace>MSFSPopoutPanelManager.WindowsAgent</RootNamespace>
<Platforms>x64</Platforms> <Platforms>x64</Platforms>
<Version>4.0.2.7</Version> <Version>4.0.2.8</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion> <AssemblyVersion>4.0.2.8</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion> <FileVersion>4.0.2.8</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType> <DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations> <Configurations>Debug;Release;Local</Configurations>