149: Stored Client Layout doesn't persist information about maximized EVE client windows
This commit is contained in:
@@ -31,7 +31,7 @@ namespace EveOPreview.Services.Implementation
|
||||
|
||||
if ((style & InteropConstants.WS_MINIMIZE) == InteropConstants.WS_MINIMIZE)
|
||||
{
|
||||
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_SHOWNORMAL);
|
||||
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_RESTORE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,11 @@ namespace EveOPreview.Services.Implementation
|
||||
User32NativeMethods.MoveWindow(handle, left, top, width, height, true);
|
||||
}
|
||||
|
||||
public void MaximizeWindow(IntPtr handle)
|
||||
{
|
||||
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_SHOWMAXIMIZED);
|
||||
}
|
||||
|
||||
public (int Left, int Top, int Right, int Bottom) GetWindowPosition(IntPtr handle)
|
||||
{
|
||||
User32NativeMethods.GetWindowRect(handle, out RECT windowRectangle);
|
||||
@@ -63,6 +68,11 @@ namespace EveOPreview.Services.Implementation
|
||||
return (windowRectangle.Left, windowRectangle.Top, windowRectangle.Right, windowRectangle.Bottom);
|
||||
}
|
||||
|
||||
public bool IsWindowMaximized(IntPtr handle)
|
||||
{
|
||||
return User32NativeMethods.IsZoomed(handle);
|
||||
}
|
||||
|
||||
public bool IsWindowMinimized(IntPtr handle)
|
||||
{
|
||||
return User32NativeMethods.IsIconic(handle);
|
||||
|
||||
Reference in New Issue
Block a user