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

Allow doubles in Custom XLer Window #2417

Merged
merged 17 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions MetaMorpheus/GUI/Views/CustomCrosslinkerWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,23 @@
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="1">
<Label x:Name="lblUdXLkerTotalMass" Content="Crosslinker Total Mass" />
<TextBox x:Name="txtUdXLkerTotalMs" PreviewTextInput="CheckIfNumber" Width="60"/>
<local:DoubleTextBoxControl x:Name="txtUdXLkerTotalMs" Width="60"/>
</StackPanel>
<CheckBox x:Name="ckbUdXLkerCleavable" Content="Cleavable" Grid.Column="0" Grid.Row="2" />
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="3">
<Label x:Name="lblUdXLkerShortMass" Content="Crosslinker Short Mass" />
<TextBox x:Name="txtUdXLkerShortMass" PreviewTextInput="CheckIfNumber" Width="60" IsEnabled="{Binding IsChecked, ElementName=ckbUdXLkerCleavable}" />
<local:DoubleTextBoxControl x:Name="txtUdXLkerShortMass" Width="60"
IsEnabled="{Binding IsChecked, ElementName=ckbUdXLkerCleavable}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="4">
<Label x:Name="lblUdXLkerLongMass" Content="Crosslinker Long Mass" />
<TextBox x:Name="txtUdXLkerLongMass" PreviewTextInput="CheckIfNumber" Width="60" IsEnabled="{Binding IsChecked, ElementName=ckbUdXLkerCleavable}" />
<local:DoubleTextBoxControl x:Name="txtUdXLkerLongMass" Width="60"
IsEnabled="{Binding IsChecked, ElementName=ckbUdXLkerCleavable}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="5">
<Label Content="DissociationType" />
<TextBox x:Name="txtDissociationType" Width="60" IsEnabled="{Binding IsChecked, ElementName=ckbUdXLkerCleavable}"/>
<TextBox x:Name="txtDissociationType" Width="60"
IsEnabled="{Binding IsChecked, ElementName=ckbUdXLkerCleavable}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0">
<Label x:Name="lblUdXLkerAminoAcid" Content="Crosslinker Amino Acids" />
Expand All @@ -57,15 +60,18 @@

<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="3">
<Label Content="H2O Quench Mass" />
<TextBox x:Name="txtH2OQuenchMass" PreviewTextInput="CheckIfNumber" Width="60" IsEnabled="{Binding IsChecked, ElementName=ckbQuenchH2O}" />
<local:DoubleTextBoxControl x:Name="txtH2OQuenchMass" Width="60"
IsEnabled="{Binding IsChecked, ElementName=ckbQuenchH2O}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="4">
<Label Content="NH2 Quench Mass" />
<TextBox x:Name="txtNH2QuenchMass" PreviewTextInput="CheckIfNumber" Width="60" IsEnabled="{Binding IsChecked, ElementName=ckbQuenchNH2}" />
<local:DoubleTextBoxControl x:Name="txtNH2QuenchMass" Width="60"
IsEnabled="{Binding IsChecked, ElementName=ckbQuenchNH2}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="5">
<Label Content="Tris Quench Mass" />
<TextBox x:Name="txtTrisQuenchMass" PreviewTextInput="CheckIfNumber" Width="60" IsEnabled="{Binding IsChecked, ElementName=ckbQuenchTris}" />
<local:DoubleTextBoxControl x:Name="txtTrisQuenchMass" Width="60"
IsEnabled="{Binding IsChecked, ElementName=ckbQuenchTris}" />
</StackPanel>
</Grid>
</StackPanel>
Expand Down
5 changes: 0 additions & 5 deletions MetaMorpheus/GUI/Views/CustomCrosslinkerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,5 @@ private void CancelButton_Click(object sender, RoutedEventArgs e)
{
DialogResult = false;
}

private void CheckIfNumber(object sender, TextCompositionEventArgs e)
{
e.Handled = !GlobalGuiSettings.CheckIsPositiveInteger(e.Text);
}
}
}
Loading