149: Stored Client Layout doesn't persist information about maximized EVE client windows

This commit is contained in:
Anton Kasyanov
2019-06-10 21:29:07 +03:00
parent 0199f9f4a6
commit 4740b9185f
6 changed files with 34 additions and 11 deletions

View File

@@ -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);