Skip to content

Commit 4035b2a

Browse files
author
LAB02 Research
committed
v2023.3.13.1
1 parent bcb7645 commit 4035b2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5206
-246
lines changed

src/DeepLClient/Controls/DocumentsPage.Designer.cs

Lines changed: 51 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/DeepLClient/Controls/DocumentsPage.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ private async void SelectSourceFile()
8383

8484
TbSourceDocument.Text = dialog.FileName;
8585
TbSourceDocument.SelectionStart = TbSourceDocument.Text.Length;
86+
87+
ActiveControl = BtnTranslate;
8688
}
8789

8890
/// <summary>
@@ -186,6 +188,9 @@ private async Task<bool> ProcessSelectedDocument(string file)
186188
finally
187189
{
188190
LockInterface(false);
191+
192+
// set focus to translate button
193+
ActiveControl = BtnTranslate;
189194
}
190195
}
191196

@@ -437,6 +442,9 @@ private async void ExecuteTranslation()
437442
finally
438443
{
439444
LockInterface(false);
445+
446+
// set focus to open-translated-folder button
447+
ActiveControl = BtnOpenTranslatedFolder;
440448
}
441449
}
442450

@@ -571,8 +579,9 @@ private void LockInterface(bool @lock = true)
571579
CbTargetFormality.Enabled = !@lock;
572580
LblFormalityInfo.Enabled = !@lock;
573581
BtnTranslate.Enabled = !@lock;
574-
TbOpenTranslatedFolder.Enabled = !@lock;
582+
BtnOpenTranslatedFolder.Enabled = !@lock;
575583
TbTranslatedDocument.Enabled = !@lock;
584+
BtnClean.Enabled = !@lock;
576585
}));
577586
}
578587

@@ -614,6 +623,6 @@ private void BtnClean_Click(object sender, EventArgs e)
614623

615624
private void BtnBrowse_Click(object sender, EventArgs e) => SelectSourceFile();
616625

617-
private void TbOpenTranslatedFolder_Click(object sender, EventArgs e) => OpenTranslatedDocumentFolder();
626+
private void BtnOpenTranslatedFolder_Click(object sender, EventArgs e) => OpenTranslatedDocumentFolder();
618627
}
619628
}

0 commit comments

Comments
 (0)