aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-24 18:30:53 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-24 18:30:53 +0200
commit11e64f69d00d84974bb09bef6f921c7eeab7c47e (patch)
tree4981a4e079bb4d4c669901ffad6387fcfc9ed1ff /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters
parente82bd25172095f1a521a95179b35cb01db7e8a62 (diff)
downloadTango-11e64f69d00d84974bb09bef6f921c7eeab7c47e.tar.gz
Tango-11e64f69d00d84974bb09bef6f921c7eeab7c47e.zip
Added Graphs Drag & Drop to Developer Module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/SecondsToGraphPointsConverter.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/SecondsToGraphPointsConverter.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/SecondsToGraphPointsConverter.cs
new file mode 100644
index 000000000..17df7b9d5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/SecondsToGraphPointsConverter.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Tango.MachineStudio.Common.Converters
+{
+ /// <summary>
+ /// Converts number of seconds to graph FIFO capacity.
+ /// </summary>
+ /// <seealso cref="System.Windows.Data.IValueConverter" />
+ public class SecondsToGraphPointsConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ double arrLength = double.Parse(parameter.ToString());
+ return Helpers.GraphsHelper.GetMaxPoints(arrLength);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ return value;
+ }
+ }
+} \ No newline at end of file