Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Commit

Permalink
解决窗口最小化时无法弹出的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
NPCDW committed Apr 23, 2022
1 parent 83c77b2 commit cf52608
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 20 deletions.
18 changes: 2 additions & 16 deletions WindowsFormsOCR/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ private void Setting_Click(object sender, EventArgs e)
{
if (form is SettingForm)
{
form.WindowState = FormWindowState.Normal;
form.Activate();
return;
}
Expand Down Expand Up @@ -89,6 +90,7 @@ private void Translate_HotKey_Click(object sender, EventArgs e)
if (item is TranslateAndOcrForm)
{
form = (TranslateAndOcrForm)item;
form.WindowState = FormWindowState.Normal;
form.Activate();
break;
}
Expand All @@ -110,29 +112,13 @@ private void Translate_HotKey_Click(object sender, EventArgs e)

private void ScreenshotTranslation_Click(object sender, EventArgs e)
{
foreach (Form form in Application.OpenForms)
{
if (form is ScreenshotForm)
{
form.Activate();
return;
}
}
ScreenshotForm body = new ScreenshotForm("translate");
body.Size = Screen.PrimaryScreen.Bounds.Size;
body.Show();
}

private void OcrButton_Click(object sender, EventArgs e)
{
foreach (Form form in Application.OpenForms)
{
if (form is ScreenshotForm)
{
form.Activate();
return;
}
}
ScreenshotForm body = new ScreenshotForm();
body.Size = Screen.PrimaryScreen.Bounds.Size;
body.Show();
Expand Down
4 changes: 2 additions & 2 deletions WindowsFormsOCR/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.1")]
[assembly: AssemblyFileVersion("1.3.1")]
[assembly: AssemblyVersion("1.3.2")]
[assembly: AssemblyFileVersion("1.3.2")]
1 change: 1 addition & 0 deletions WindowsFormsOCR/ScreenshotForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ private void Screenshot_MouseUp(object sender, MouseEventArgs e)
if (item is TranslateAndOcrForm)
{
form = (TranslateAndOcrForm)item;
form.WindowState = FormWindowState.Normal;
form.Activate();
break;
}
Expand Down
4 changes: 2 additions & 2 deletions WindowsFormsOCR/SettingForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions WindowsFormsOCR/TranslateAndOCRForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf52608

Please sign in to comment.