aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2025-08-21 19:27:39 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2025-08-21 19:27:39 +0300
commit27581825838039ef77ba1c6466f044b61eb8a009 (patch)
tree945f048ed5e1875d113ec59a20c8570fe5cdd0f3 /Software
parent3d8c362cd5409246c7026ea956ce10d51ed9ebc3 (diff)
downloadTango-27581825838039ef77ba1c6466f044b61eb8a009.tar.gz
Tango-27581825838039ef77ba1c6466f044b61eb8a009.zip
Implemented numeric textbox and keyboard step connection.
Diffstat (limited to 'Software')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/IValueControl.cs1
-rw-r--r--Software/Visual_Studio/Tango.Touch/Keyboard/TouchKeyboard.cs18
2 files changed, 17 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/IValueControl.cs b/Software/Visual_Studio/Tango.Touch/Controls/IValueControl.cs
index 86158f41c..761ac83bd 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/IValueControl.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/IValueControl.cs
@@ -11,6 +11,7 @@ namespace Tango.Touch.Controls
double Value { get; set; }
double Minimum { get; set; }
double Maximum { get; set; }
+ double Step { get; set; }
double JoggingFactor { get; set; }
bool AutoCalculateJogStep { get; set; }
}
diff --git a/Software/Visual_Studio/Tango.Touch/Keyboard/TouchKeyboard.cs b/Software/Visual_Studio/Tango.Touch/Keyboard/TouchKeyboard.cs
index 7dc88dd8d..0bbba03ad 100644
--- a/Software/Visual_Studio/Tango.Touch/Keyboard/TouchKeyboard.cs
+++ b/Software/Visual_Studio/Tango.Touch/Keyboard/TouchKeyboard.cs
@@ -314,7 +314,14 @@ namespace Tango.Touch.Keyboard
if (control != null)
{
- control.Value -= 1;
+ if (control.Step > 0)
+ {
+ control.Value -= control.Step;
+ }
+ else
+ {
+ control.Value -= 1;
+ }
}
}
}
@@ -329,7 +336,14 @@ namespace Tango.Touch.Keyboard
if (control != null)
{
- control.Value += 1;
+ if (control.Step > 0)
+ {
+ control.Value += control.Step;
+ }
+ else
+ {
+ control.Value += 1;
+ }
}
}
}