OneShotモードをホットキー実行として復活 - #670
Open
Freeesia wants to merge 12 commits into
Open
Conversation
Freeesia
commented
Aug 11, 2026
Freeesia
commented
Aug 14, 2026
| private void Window_Loaded(object sender, RoutedEventArgs e) | ||
| { | ||
| this.timer.Start(); | ||
| if (this.isOneShotMode) |
Owner
Author
There was a problem hiding this comment.
ホットキーの登録はOneShotかどうかに関わらず必要では?本当にオーバーレイと実装揃ってる?
Owner
Author
There was a problem hiding this comment.
ご指摘のとおり、Capture表示のホットキー登録はOneShot固有の変更として入れるべきではありませんでした。今回の変更範囲とは関係ないため、CaptureMainWindowの差分をすべて戻し、OneShotはOverlay表示の既存ホットキー経路だけで起動する形に修正しました。
Owner
Author
There was a problem hiding this comment.
再確認し、ご指摘どおりCapture表示にもOneShotに関係なくホットキー登録が必要と判断しました。Overlay表示と同じHold/Toggleの表示切り替えを追加し、両Windowとも表示状態の変更だけをViewModelへ伝える形に揃えました。RequestOneShot()は削除し、OneShotの開始は既存のOnOverlayVisibleChangedへ統合しています。
Freeesia
marked this pull request as ready for review
August 25, 2026 15:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
以前存在したOneShotモードを、Overlay表示とCapture表示の表示切り替え時にOCR・翻訳する機能として復活します。
背景
OCR表示をテキスト追跡方式へ移行した際にOneShot設定が削除されていました。
OneShotでは前回フレームの位置や追跡状態を引き継がず、ホットキーで表示へ切り替えたときに最初に届いた画像だけを独立して処理します。
変更内容
IsOneShotMode設定と設定画面、日英リソースを復活OneWayToSourceでViewModelのOverlayVisibleへ通知RequestOneShot()を持たず、既存の表示切り替え処理へ統合影響
通常モードの周期OCRとテキスト追跡は従来どおりです。
Capture表示でも
OverlayShortcutによる表示切り替えが利用できます。OneShot有効時は、表示へ切り替えるたびに新しいキャプチャーセッションを開始します。
検証
dotnet build WindowTranslator.Tests\WindowTranslator.Tests.csproj --no-restore --configuration Debug --verbosity minimal -m:1 --disable-build-servers -p:UseSharedCompilation=falseLanguageOptions.cs警告1件のみ)dotnet test WindowTranslator.Tests\WindowTranslator.Tests.csproj --no-build --no-restore --configuration Debug --verbosity minimal -m:1 --disable-build-servers