mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-22 13:50:14 +00:00
Started Version 3.3.7 development
This commit is contained in:
parent
287dcc23dd
commit
53df5678a1
3 changed files with 22 additions and 1 deletions
|
@ -22,6 +22,7 @@ namespace MSFSPopoutPanelManager.Provider
|
||||||
|
|
||||||
public static void LeftClick(int x, int y)
|
public static void LeftClick(int x, int y)
|
||||||
{
|
{
|
||||||
|
PInvoke.SetCursorPos(x, y);
|
||||||
PInvoke.SetCursorPos(x, y);
|
PInvoke.SetCursorPos(x, y);
|
||||||
Thread.Sleep(300);
|
Thread.Sleep(300);
|
||||||
|
|
||||||
|
@ -42,6 +43,7 @@ namespace MSFSPopoutPanelManager.Provider
|
||||||
LeftClick(x, y);
|
LeftClick(x, y);
|
||||||
Thread.Sleep(300);
|
Thread.Sleep(300);
|
||||||
|
|
||||||
|
PInvoke.SetCursorPos(x, y);
|
||||||
PInvoke.SetCursorPos(x, y);
|
PInvoke.SetCursorPos(x, y);
|
||||||
Thread.Sleep(300);
|
Thread.Sleep(300);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
# Version History
|
# Version History
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
|
## Version 3.3.7
|
||||||
|
* Fixed an issue where panel number circles are displayed at the wrong location instead of at the location where you clicked your mouse when setting monitor scale that is greater than 100% in Windows display setting.
|
||||||
|
|
||||||
## Version 3.3.6
|
## Version 3.3.6
|
||||||
* Hot Fix: Resolved an issue where panel separation fails if your MSFS game window is not on the same monitor as where the panels are initially popped out (upper left corner).
|
* Hot Fix: Resolved an issue where panel separation fails if your MSFS game window is not on the same monitor as where the panels are initially popped out (upper left corner).
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
using MSFSPopoutPanelManager.Shared;
|
using MSFSPopoutPanelManager.Provider;
|
||||||
|
using MSFSPopoutPanelManager.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Interop;
|
||||||
|
|
||||||
namespace MSFSPopoutPanelManager.WpfApp
|
namespace MSFSPopoutPanelManager.WpfApp
|
||||||
{
|
{
|
||||||
|
@ -9,6 +11,9 @@ namespace MSFSPopoutPanelManager.WpfApp
|
||||||
private const int TOP_ADJUSTMENT = 23; // half of window height
|
private const int TOP_ADJUSTMENT = 23; // half of window height
|
||||||
private const int LEFT_ADJUSTMENT = 27; // half of window width
|
private const int LEFT_ADJUSTMENT = 27; // half of window width
|
||||||
|
|
||||||
|
private int _leftCoor;
|
||||||
|
private int _topCoor;
|
||||||
|
|
||||||
public bool IsEditingPanelLocation { get; set; }
|
public bool IsEditingPanelLocation { get; set; }
|
||||||
|
|
||||||
public IntPtr WindowHandle { get; set; }
|
public IntPtr WindowHandle { get; set; }
|
||||||
|
@ -22,14 +27,25 @@ namespace MSFSPopoutPanelManager.WpfApp
|
||||||
IsEditingPanelLocation = false;
|
IsEditingPanelLocation = false;
|
||||||
|
|
||||||
this.LocationChanged += PanelCoorOverlay_LocationChanged;
|
this.LocationChanged += PanelCoorOverlay_LocationChanged;
|
||||||
|
this.Loaded += PanelCoorOverlay_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveWindow(int x, int y)
|
public void MoveWindow(int x, int y)
|
||||||
{
|
{
|
||||||
|
_leftCoor = x - LEFT_ADJUSTMENT;
|
||||||
|
_topCoor = y - TOP_ADJUSTMENT;
|
||||||
|
|
||||||
this.Left = x - LEFT_ADJUSTMENT;
|
this.Left = x - LEFT_ADJUSTMENT;
|
||||||
this.Top = y - TOP_ADJUSTMENT;
|
this.Top = y - TOP_ADJUSTMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PanelCoorOverlay_Loaded(object sender, System.EventArgs e)
|
||||||
|
{
|
||||||
|
// Fixed broken window left/top coordinate for DPI Awareness Per Monitor
|
||||||
|
var handle = new WindowInteropHelper(this).Handle;
|
||||||
|
WindowManager.MoveWindow(handle, _leftCoor, _topCoor);
|
||||||
|
}
|
||||||
|
|
||||||
private void PanelCoorOverlay_LocationChanged(object sender, EventArgs e)
|
private void PanelCoorOverlay_LocationChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (this.Top is double.NaN || this.Left is double.NaN)
|
if (this.Top is double.NaN || this.Left is double.NaN)
|
||||||
|
|
Loading…
Reference in a new issue