Skip to content

Commit

Permalink
fix 异常坐标导致窗口无法看到 #78
Browse files Browse the repository at this point in the history
  • Loading branch information
pdone committed Jul 19, 2024
1 parent 9367b41 commit df82252
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
10 changes: 7 additions & 3 deletions FreeControl/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,13 @@ public void InitPdone()
ExtractResource(reload);
if (_Setting.MainWindowX != 0 || _Setting.MainWindowY != 0)
{
// 主窗口位置
StartPosition = FormStartPosition.Manual;
Location = new Point(_Setting.MainWindowX, _Setting.MainWindowY);
// 避免异常坐标导致窗口无法看到 同时需要考虑双屏时的负坐标 三屏或以上暂时无法测试与兼容
if (_Setting.MainWindowX.InRange(-1980, 1980) && _Setting.MainWindowY.InRange(-1080, 1080))
{
// 主窗口位置
StartPosition = FormStartPosition.Manual;
Location = new Point(_Setting.MainWindowX, _Setting.MainWindowY);
}
}

#region 控件状态
Expand Down
4 changes: 2 additions & 2 deletions FreeControl/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.7.1")]
[assembly: AssemblyVersion("1.7.1")]
[assembly: AssemblyFileVersion("1.7.2")]
[assembly: AssemblyVersion("1.7.2")]
3 changes: 3 additions & 0 deletions FreeControl/Update.en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Free Control Update Record

## v1.7.2
- Fix bug

## v1.7.1
- Add `Workflows`
- Fix `PowerOffOnClose` parameter not taking effect
Expand Down
3 changes: 3 additions & 0 deletions FreeControl/Update.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Free Control 更新记录

## v1.7.2
- 修复了一些bug

## v1.7.1
- 增加 `Workflows`
- 修复 `PowerOffOnClose` 参数未生效的问题
Expand Down

0 comments on commit df82252

Please sign in to comment.