* 修改小Bug

This commit is contained in:
Sunny 2020-07-24 20:45:11 +08:00
parent 3a3ab1bf2d
commit 0a3a0ca63e
5 changed files with 24 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -453,7 +453,7 @@ namespace Sunny.UI
if (MenuHelper.GetSymbol(e.Node) > 0)
{
SizeF fiSize = e.Graphics.GetFontImageSize(MenuHelper.GetSymbol(e.Node), MenuHelper.GetSymbolSize(e.Node));
e.Graphics.DrawFontImage(MenuHelper.GetSymbol(e.Node), MenuHelper.GetSymbolSize(e.Node), Color.White, imageLeft + (MenuHelper.GetSymbolSize(e.Node) - fiSize.Width) / 2.0f, e.Bounds.Y + (e.Bounds.Height - fiSize.Height) / 2);
e.Graphics.DrawFontImage(MenuHelper.GetSymbol(e.Node), MenuHelper.GetSymbolSize(e.Node), ForeColor, imageLeft + (MenuHelper.GetSymbolSize(e.Node) - fiSize.Width) / 2.0f, e.Bounds.Y + (e.Bounds.Height - fiSize.Height) / 2);
}
else
{

View File

@ -1232,5 +1232,28 @@ namespace Sunny.UI
}
}
}
public void Show(FormWindowState state)
{
ShowFullScreen = false;
switch (state)
{
case FormWindowState.Minimized:
WindowState = FormWindowState.Minimized;
base.WindowState = FormWindowState.Minimized;
break;
case FormWindowState.Maximized:
base.WindowState = FormWindowState.Normal;
WindowState = FormWindowState.Normal;
ShowMaximize();
break;
case FormWindowState.Normal:
base.WindowState = FormWindowState.Normal;
WindowState = FormWindowState.Maximized;
ShowMaximize();
break;
}
}
}
}