mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Merge pull request #2868 from campbeb/issue2852
Support CTRL+A in OCR results window
This commit is contained in:
commit
ec03407647
2 changed files with 13 additions and 0 deletions
|
@ -67,6 +67,7 @@ private void InitializeComponent()
|
|||
this.txtResult.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.txtResult.Size = new System.Drawing.Size(544, 368);
|
||||
this.txtResult.TabIndex = 2;
|
||||
this.txtResult.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtResult_KeyDown);
|
||||
//
|
||||
// lblResult
|
||||
//
|
||||
|
|
|
@ -105,6 +105,7 @@ private void StartOCR(Stream stream, string filename)
|
|||
UpdateControls();
|
||||
cbLanguages.Enabled = btnStartOCR.Enabled = txtResult.Enabled = true;
|
||||
pbProgress.Visible = false;
|
||||
txtResult.Focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -124,5 +125,16 @@ private void llAttribution_LinkClicked(object sender, LinkLabelLinkClickedEventA
|
|||
{
|
||||
URLHelpers.OpenURL("https://ocr.space");
|
||||
}
|
||||
|
||||
private void txtResult_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Control && e.KeyCode == Keys.A)
|
||||
{
|
||||
if (sender != null)
|
||||
((TextBox)sender).SelectAll();
|
||||
e.SuppressKeyPress = true; // TextBox will beep if it gets the CTRL+A
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue