aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2024-09-03 22:47:14 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2024-09-03 22:47:14 +0300
commitafaa83f7b7a9fe78e34d069a43b0f2d61cc38b69 (patch)
treedaa087c9ed287ec83df167fcbb92dd973f38904b /Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
parent507557c575f9e0cd53a288415d8dd92f7a001b36 (diff)
downloadTango-afaa83f7b7a9fe78e34d069a43b0f2d61cc38b69.tar.gz
Tango-afaa83f7b7a9fe78e34d069a43b0f2d61cc38b69.zip
Fixed rounding of liquid volumes CMYK and numeric controls.
Better support for TS-1800 waste replace process.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs32
1 files changed, 16 insertions, 16 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
index 6c09cdc59..66433afc4 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
@@ -112,13 +112,13 @@ namespace Tango.Touch.Controls
}
public static readonly DependencyProperty MaximumProperty =
DependencyProperty.Register("Maximum", typeof(double), typeof(TouchNumericTextBox), new PropertyMetadata(null));
-
+
public double Step
{
get { return (double)GetValue(StepProperty); }
set { SetValue(StepProperty, value); }
}
-
+
public static readonly DependencyProperty StepProperty =
DependencyProperty.Register("Step", typeof(double), typeof(TouchNumericTextBox), new PropertyMetadata(null));
@@ -154,7 +154,7 @@ namespace Tango.Touch.Controls
set { SetValue(RippleBrushProperty, value); }
}
public static readonly DependencyProperty RippleBrushProperty =
- DependencyProperty.Register("RippleBrush", typeof(Brush), typeof(TouchNumericTextBox), new PropertyMetadata(new SolidColorBrush(Color.FromRgb(189,189,189)) { Opacity = 0.28 }));
+ DependencyProperty.Register("RippleBrush", typeof(Brush), typeof(TouchNumericTextBox), new PropertyMetadata(new SolidColorBrush(Color.FromRgb(189, 189, 189)) { Opacity = 0.28 }));
public virtual bool HasError
@@ -164,7 +164,7 @@ namespace Tango.Touch.Controls
return Validation.GetHasError(this);
}
}
-
+
public override void OnApplyTemplate()
{
@@ -214,7 +214,7 @@ namespace Tango.Touch.Controls
int coef = (int)((value + Step - 1) / Step);
value = coef * Step;
}
- if(Minimum > 0 && value < Minimum)
+ if (Minimum > 0 && value < Minimum)
{
value = Minimum;
}
@@ -229,7 +229,7 @@ namespace Tango.Touch.Controls
{
value = Maximum;
}
-
+
}
}
@@ -276,16 +276,16 @@ namespace Tango.Touch.Controls
{
_prevent_text_change = true;
- if (StringFormat != null)
- {
- _text_box.Text = Value.ToString(StringFormat);
- }
- else
- {
- _text_box.Text = Value.ToString();
- }
+ //if (StringFormat != null)
+ //{
+ // _text_box.Text = Value.ToString(StringFormat);
+ //}
+ //else
+ //{
+ _text_box.Text = Value.ToString();
+ //}
- _text_block.Text = _text_box.Text;
+ _text_block.Text = Value.ToString(StringFormat);
_prevent_text_change = false;
}
@@ -316,7 +316,7 @@ namespace Tango.Touch.Controls
e.Handled = true;
return;
}
- else if(e.Text == "." && HasDecimalPoint)
+ else if (e.Text == "." && HasDecimalPoint)
{
e.Handled = false;
return;