Skip to content

refactor(codebase): 整理 C# 註解、命名與格式#9

Merged
perditavojo merged 2 commits into
mainfrom
dev
Apr 16, 2026
Merged

refactor(codebase): 整理 C# 註解、命名與格式#9
perditavojo merged 2 commits into
mainfrom
dev

Conversation

@perditavojo
Copy link
Copy Markdown
Contributor

  • 統一事件處理器、引數與區域變數命名
  • 補強註解可讀性並維持既有行為
  • 套用 .editorconfig,並確認建置與測試通過

- 統一事件處理器、引數與區域變數命名
- 補強註解可讀性並維持既有行為
- 套用 .editorconfig,並確認建置與測試通過
Copilot AI review requested due to automatic review settings April 16, 2026 12:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

此 PR 以不改變既有行為為前提,統一與整理專案內多處 C# 的命名、註解與格式(包含事件處理器參數命名與測試中的變數命名),以提升可讀性與一致性。

Changes:

  • 統一多個測試案例中的區域變數命名(例如 excapturedExceptiona/bfirst/secondssettings)。
  • 重命名並補強多處事件處理器/私有方法的命名與 XML 註解(例如 UpdateStateRefreshInputState、Button eye-tracker handlers 命名一致化)。
  • AppSettings 儲存流程中變數命名整理(strJsonContentjsonContentstrTempPathtempPath)。

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/InputBox.Tests/VibrationPatternsTests.cs 測試區域變數命名一致化,提升可讀性。
tests/InputBox.Tests/TaskExtensionsTests.cs 例外捕捉變數命名一致化(capturedException)。
tests/InputBox.Tests/GamepadRepeatSettingsTests.cs Record.Exception 結果變數命名一致化。
tests/InputBox.Tests/AppSettingsTests.cs 測試內 AppSettings 變數命名由 s 統一為 settings/snapshot
tests/InputBox.Tests/AnnouncementServiceTests.cs Record.Exception 結果變數命名一致化。
src/InputBox/Core/Input/FormInputContext.cs 方法/參數命名與註解補強(UpdateStateRefreshInputState)。
src/InputBox/Core/Extensions/ButtonEyeTrackerExtensions.cs 狀態表與事件處理器命名一致化(_btnStates_buttonStates、handlers rename)。
src/InputBox/Core/Controls/PhraseEditDialog.cs TextBox Enter/Leave handlers 命名與註解一致化。
src/InputBox/Core/Configuration/AppSettings.cs Save/WriteConfigToFile 區域變數命名整理。

Comment thread src/InputBox/Core/Configuration/AppSettings.cs
@perditavojo
Copy link
Copy Markdown
Contributor Author

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

@copilot apply changes based on the comments in this thread

Fixed in commit 1700a9e. On the success path, UnregisterActiveConfigTempFile(tempPath) is now called before tempPath = string.Empty, so the originally registered path is always removed from ActiveConfigTempFiles. The finally block still receives an empty string (a no-op for both unregister and delete), so successful replace/move continues to skip deletion.

@perditavojo perditavojo merged commit 7778e69 into main Apr 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants