Update expect.txt and improve code comments

Updated `expect.txt` to add new terms (e.g., `debouncer`, `onnx`, `PowerDisplay`) and remove outdated ones across multiple sections.

Refined comments in the codebase for grammatical accuracy, clarity, and consistency:
- Corrected verb forms (e.g., "fallback" to "fall back").
- Fixed spelling (e.g., "re-entrant" to "reentrant").
- Improved punctuation for better readability.

These changes enhance code maintainability and ensure up-to-date terminology.
This commit is contained in:
Yu Leng
2025-12-02 04:15:11 +08:00
parent 6f1b336040
commit 61e636d1ea
6 changed files with 28 additions and 12 deletions

View File

@@ -347,12 +347,16 @@ DCBA
DCOM
DComposition
DCR
Ddc
DdcCi
DDEIf
Deact
debouncer
debugbreak
decryptor
Dedup
Deduplicator
Deeplink
DEFAULTBOOTSTRAPPERINSTALLFOLDER
DEFAULTCOLOR
DEFAULTFLAGS
@@ -629,6 +633,7 @@ hangeul
Hanzi
Hardlines
hardlinks
HardwareId
HARDWAREINPUT
Hashset
hashtag
@@ -647,6 +652,8 @@ HCRYPTPROV
hcursor
hcwhite
hdc
hdmi
HDMI
hdr
hdrop
hdwwiz
@@ -793,6 +800,7 @@ INSTALLSTARTMENUSHORTCUT
INSTALLSTATE
Inste
Interlop
InternalName
intput
INTRESOURCE
INVALIDARG
@@ -825,6 +833,7 @@ jpnime
Jsons
jsonval
jxr
kelvin
keybd
KEYBDDATA
KEYBDINPUT
@@ -1056,9 +1065,9 @@ MSLLHOOKSTRUCT
Mso
msrc
msstore
mstsc
msvcp
MT
mstsc
MTND
MULTIPLEUSE
multizone
@@ -1202,8 +1211,10 @@ oldtheme
oleaut
OLECHAR
ollama
ollama
onebranch
onnx
onnx
OOBEUI
openas
opencode
@@ -1211,8 +1222,6 @@ OPENFILENAME
openrdp
opensource
openxmlformats
ollama
onnx
OPTIMIZEFORINVOKE
ORPHANEDDIALOGTITLE
ORSCANS
@@ -1315,6 +1324,8 @@ Pomodoro
Popups
POPUPWINDOW
POSITIONITEM
powerdisplay
PowerDisplay
POWERRENAMECONTEXTMENU
powerrenameinput
POWERRENAMETEST
@@ -1425,7 +1436,6 @@ RAWPATH
rbhid
rclsid
RCZOOMIT
remotedesktop
rdp
RDW
READMODE
@@ -1454,6 +1464,7 @@ remappings
REMAPSUCCESSFUL
REMAPUNSUCCESSFUL
Remotable
remotedesktop
remoteip
Removelnk
renamable
@@ -1887,6 +1898,10 @@ vcamp
VCENTER
vcgtq
VCINSTALLDIR
vcp
VCP
VcpCode
VcpCodes
Vcpkg
VCRT
vcruntime
@@ -1899,6 +1914,7 @@ VERIFYCONTEXT
VERSIONINFO
VERTRES
VERTSIZE
VESA
VFT
vget
vgetq

View File

@@ -42,7 +42,7 @@ namespace PowerDisplay.Common.Drivers.DDC
}
/// <summary>
/// Try to reuse existing handle if valid, otherwise use new handle
/// Try to reuse existing handle if valid; otherwise uses new handle
/// Returns the handle to use and whether it was reused
/// </summary>
public (IntPtr Handle, bool WasReused) ReuseOrCreateHandle(string deviceKey, IntPtr newHandle)

View File

@@ -152,7 +152,7 @@ namespace PowerDisplay.Common.Utils
/// <summary>
/// Generate a unique key for monitor matching based on hardware ID and internal name.
/// Uses HardwareId if available, otherwise falls back to Id (InternalName) or Name.
/// Uses HardwareId if available; otherwise falls back to Id (InternalName) or Name.
/// </summary>
/// <param name="monitor">The monitor data to generate a key for.</param>
/// <returns>A unique string key for the monitor.</returns>

View File

@@ -254,7 +254,7 @@ public partial class MainViewModel
foreach (var setting in monitorSettings)
{
// Find monitor by InternalName first (unique identifier), fallback to HardwareId for old profiles
// Find monitor by InternalName first (unique identifier), fall back to HardwareId for old profiles
MonitorViewModel? monitorVm = null;
if (!string.IsNullOrEmpty(setting.MonitorInternalName))

View File

@@ -193,7 +193,7 @@ public partial class MainViewModel : INotifyPropertyChanged, IDisposable
{
var displayArea = displayAreas[index];
// Get monitor number: prefer MonitorManager's number, fallback to index+1
// Get monitor number: prefer MonitorManager's number, fall back to index+1
int monitorNumber = (index < monitors.Count)
? monitors[index].MonitorNumber
: index + 1;

View File

@@ -22,7 +22,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
{
private PowerDisplayViewModel ViewModel { get; set; }
// Flag to prevent re-entrant SelectionChanged handling during programmatic selection
// Flag to prevent reentrant SelectionChanged handling during programmatic selection
private bool _isRestoringSelection;
public PowerDisplayPage()
@@ -55,7 +55,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
private async void ColorTemperatureComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
// Skip if we're programmatically restoring a selection (prevents re-entrant handling)
// Skip if we're programmatically restoring a selection (prevents reentrant handling)
if (_isRestoringSelection)
{
return;
@@ -84,7 +84,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
return;
}
// Get old value: from RemovedItems if available, otherwise from current property
// Get old value: from RemovedItems if available; otherwise from current property
int oldValue = (e.RemovedItems.Count > 0 && e.RemovedItems[0] is ColorPresetItem oldItem)
? oldItem.VcpValue
: monitor.ColorTemperatureVcp;
@@ -142,7 +142,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
else
{
// User cancelled: revert ComboBox to previous selection (property unchanged)
// Use flag to prevent re-entrant event handling
// Use flag to prevent reentrant event handling
_isRestoringSelection = true;
try
{