From 27581825838039ef77ba1c6466f044b61eb8a009 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 21 Aug 2025 19:27:39 +0300 Subject: Implemented numeric textbox and keyboard step connection. --- .../Tango.Touch/Controls/IValueControl.cs | 1 + .../Tango.Touch/Keyboard/TouchKeyboard.cs | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'Software') 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; + } } } } -- cgit v1.3.1