@@ -68,8 +68,8 @@ private static readonly (string Label, ChemMasterReagentAmount Amount)[] AmountC
6868 ( Loc . GetString ( "chem-master-window-buffer-all-amount" ) , ChemMasterReagentAmount . All ) ,
6969 } ;
7070
71- private static bool IsValidCustomAmount ( string s ) => int . TryParse ( s , out var v ) && v > 0 && v <= 1000 ;
72- private bool IsCustomAmountValid ( string s ) => ! string . IsNullOrWhiteSpace ( s ) && IsValidCustomAmount ( s ) ;
71+ private static bool IsInCustomAmountRange ( string s ) => int . TryParse ( s , out var v ) && v > 0 && v <= 1000 ;
72+ private bool IsCustomAmountValid ( string s ) => ! string . IsNullOrWhiteSpace ( s ) && IsInCustomAmountRange ( s ) ;
7373
7474 /// <summary>
7575 /// Create and initialize the chem master UI client-side. Creates the basic layout,
@@ -168,8 +168,8 @@ public ModernChemMasterWindow()
168168 BuildAmountGrid ( AmountGrid ) ;
169169
170170 // Custom amount - shared validation and per-ChemMaster storage, Modern + Classic textboxes sync
171- CustomAmountLineEdit . IsValid = IsValidCustomAmount ;
172- CustomAmountLineEditClassic . IsValid = IsValidCustomAmount ;
171+ CustomAmountLineEdit . IsValid = IsInCustomAmountRange ;
172+ CustomAmountLineEditClassic . IsValid = IsInCustomAmountRange ;
173173 CustomAmountLineEdit . OnTextChanged += _ => HandleCustomAmountTextChanged ( CustomAmountLineEdit , CustomAmountLineEditClassic , isModern : true ) ;
174174 CustomAmountLineEditClassic . OnTextChanged += _ => HandleCustomAmountTextChanged ( CustomAmountLineEditClassic , CustomAmountLineEdit , isModern : false ) ;
175175 CustomAmountButton . Disabled = true ;
0 commit comments