mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-06-07 22:59:14 +08:00
Fix the problem that the next time it cannot be started when it is closed when it is minimized
This commit is contained in:
parent
c4e29dc000
commit
1d8d199af7
@ -48,7 +48,7 @@ namespace GrasscutterTools.Forms
|
|||||||
{
|
{
|
||||||
var location = Settings.Default.MainFormLocation;
|
var location = Settings.Default.MainFormLocation;
|
||||||
// 还原窗体位置
|
// 还原窗体位置
|
||||||
if (location != default && location.X >= 0 && location.Y >= 0)
|
if (location.X > 0 && location.Y > 0)
|
||||||
{
|
{
|
||||||
StartPosition = FormStartPosition.Manual;
|
StartPosition = FormStartPosition.Manual;
|
||||||
Location = location;
|
Location = location;
|
||||||
@ -62,6 +62,9 @@ namespace GrasscutterTools.Forms
|
|||||||
Logger.I(TAG, "Restore window size: " + Size.ToString());
|
Logger.I(TAG, "Restore window size: " + Size.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 恢复自动复制选项状态
|
||||||
|
ChkAutoCopy.Checked = Settings.Default.AutoCopy;
|
||||||
|
|
||||||
// 初始化页面
|
// 初始化页面
|
||||||
InitPages();
|
InitPages();
|
||||||
}
|
}
|
||||||
@ -131,9 +134,6 @@ namespace GrasscutterTools.Forms
|
|||||||
#endif
|
#endif
|
||||||
if (DesignMode) return;
|
if (DesignMode) return;
|
||||||
|
|
||||||
// 恢复自动复制选项状态
|
|
||||||
ChkAutoCopy.Checked = Settings.Default.AutoCopy;
|
|
||||||
|
|
||||||
// 加载游戏ID资源
|
// 加载游戏ID资源
|
||||||
GameData.LoadResources();
|
GameData.LoadResources();
|
||||||
|
|
||||||
@ -177,7 +177,8 @@ namespace GrasscutterTools.Forms
|
|||||||
{
|
{
|
||||||
// 记录界面状态
|
// 记录界面状态
|
||||||
Settings.Default.AutoCopy = ChkAutoCopy.Checked;
|
Settings.Default.AutoCopy = ChkAutoCopy.Checked;
|
||||||
Settings.Default.MainFormLocation = Location;
|
if (WindowState == FormWindowState.Normal)
|
||||||
|
Settings.Default.MainFormLocation = Location;
|
||||||
// 如果命令窗口已经弹出了,则不要保存多余的高度
|
// 如果命令窗口已经弹出了,则不要保存多余的高度
|
||||||
if (TxtCommandRunLog != null)
|
if (TxtCommandRunLog != null)
|
||||||
Settings.Default.MainFormSize = new Size(Width, Height - TxtCommandRunLogMinHeight);
|
Settings.Default.MainFormSize = new Size(Width, Height - TxtCommandRunLogMinHeight);
|
||||||
|
Loading…
Reference in New Issue
Block a user