Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Numerical Inputs #2433

Merged
merged 24 commits into from
Nov 4, 2024

Conversation

nbollis
Copy link
Member

@nbollis nbollis commented Oct 31, 2024

We often have bug reports where the value restriction is incorrect in GUI numerical boxes. This is due to having method that check if something is either a positive integer, or a number. These methods were called interchangeably from the same syntax in the xaml.

  • IntegerTexBoxControl and DoubleTextBoxControl were updated to automatically center the data in the box and remove your cursor from the box when you hit enter
  • CalibrateTaskWindow.xaml, GPTMDTaskWindow.xaml, GlycoSearchTaskWindow.xaml, SearchTaskWinodow.xaml, and FileSpecificParametersWindow.xaml: Replaced TextBox with IntegerTexBoxControl and DoubleTextBoxControl where appropriate
  • Removed CheckIfNumber method from corresponding code-behind files.

nbollis and others added 23 commits May 21, 2024 15:08
* Updated to MzLib 1.0.548 and fixed custom ions in search tasks

* reverted calibration task change

* merged in master bbbyy

* Enabled Library Loading from command line
- Added `HorizontalContentAlignment` and `VerticalContentAlignment` properties to center content in `DoubleTextBoxControl` and `IntegerTextBoxControl`.
- Introduced constructors to set alignment properties.
- Overrode `OnKeyDown` to clear focus on Return key press.
- Included `System.Windows` namespace in both control files.
Replaced standard TextBox controls with custom IntegerTexBoxControl and DoubleTextBoxControl in various XAML files to improve input validation and user experience. Removed the CheckIfNumber event handler and method from code-behind files as the new custom controls handle validation internally. Updated tooltips and adjusted layout properties for consistency.
@nbollis nbollis marked this pull request as ready for review October 31, 2024 02:28
@nbollis nbollis requested a review from RayMSMS October 31, 2024 02:28
@trishorts trishorts merged commit b98cfad into smith-chem-wisc:master Nov 4, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants