Skip to content

Commit 4ae3604

Browse files
committed
Better method naming
1 parent df66e7a commit 4ae3604

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Content.Client/_Starlight/Chemistry/UI/ModernChemMasterWindow.xaml.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)