mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:46:30 +00:00
fix dataset explorer view
This commit is contained in:
@@ -56,7 +56,25 @@ public partial class NumericUpDown : UserControl
|
||||
}
|
||||
}
|
||||
|
||||
private void NUDTextBox_OnTextChanged(object sender, TextChangedEventArgs e)
|
||||
private void NudButtonUp_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var step = Step <= 0 ? 1m : Step;
|
||||
var newVal = Math.Min(MaxValue, Value + step);
|
||||
Value = newVal;
|
||||
NudTextBox.Text = Value.ToString(CultureInfo.InvariantCulture);
|
||||
NudTextBox.SelectionStart = NudTextBox.Text.Length;
|
||||
}
|
||||
|
||||
private void NudButtonDown_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var step = Step <= 0 ? 1m : Step;
|
||||
var newVal = Math.Max(MinValue, Value - step);
|
||||
Value = newVal;
|
||||
NudTextBox.Text = Value.ToString(CultureInfo.InvariantCulture);
|
||||
NudTextBox.SelectionStart = NudTextBox.Text.Length;
|
||||
}
|
||||
|
||||
private void NudTextBox_OnLostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(NudTextBox.Text) || !decimal.TryParse(NudTextBox.Text, NumberStyles.Any, CultureInfo.InvariantCulture, out var number))
|
||||
{
|
||||
@@ -80,22 +98,4 @@ public partial class NumericUpDown : UserControl
|
||||
|
||||
NudTextBox.SelectionStart = NudTextBox.Text.Length;
|
||||
}
|
||||
|
||||
private void NudButtonUp_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var step = Step <= 0 ? 1m : Step;
|
||||
var newVal = Math.Min(MaxValue, Value + step);
|
||||
Value = newVal;
|
||||
NudTextBox.Text = Value.ToString(CultureInfo.InvariantCulture);
|
||||
NudTextBox.SelectionStart = NudTextBox.Text.Length;
|
||||
}
|
||||
|
||||
private void NudButtonDown_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var step = Step <= 0 ? 1m : Step;
|
||||
var newVal = Math.Max(MinValue, Value - step);
|
||||
Value = newVal;
|
||||
NudTextBox.Text = Value.ToString(CultureInfo.InvariantCulture);
|
||||
NudTextBox.SelectionStart = NudTextBox.Text.Length;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user