!8 修复副屏幕在下时停靠最大化失效的问题

Merge pull request !8 from mimr/master
This commit is contained in:
Sunny 2020-05-31 19:06:51 +08:00 committed by Gitee
commit 11dfc8c552

View File

@ -479,8 +479,8 @@ namespace Sunny.UI
private void ShowMaximize(bool IsOnMoving = false)
{
int screenIndex = GetMouseInScreen(MousePosition);
Screen screen = Screen.AllScreens[screenIndex];
//int screenIndex = GetMouseInScreen(MousePosition);
Screen screen = Screen.FromPoint(MousePosition);
if (windowState == FormWindowState.Normal)
{
size = Size;
@ -585,8 +585,8 @@ namespace Sunny.UI
if (!IsDisposed && FormMoveMouseDown)
{
int screenIndex = GetMouseInScreen(PointToScreen(e.Location));
Screen screen = Screen.AllScreens[screenIndex];
//int screenIndex = GetMouseInScreen(PointToScreen(e.Location));
Screen screen = Screen.FromPoint(MousePosition);
if (MousePosition.Y == screen.WorkingArea.Top && MaximizeBox)
{
ShowMaximize(true);