diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-24 18:30:53 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-24 18:30:53 +0200 |
| commit | 11e64f69d00d84974bb09bef6f921c7eeab7c47e (patch) | |
| tree | 4981a4e079bb4d4c669901ffad6387fcfc9ed1ff /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters | |
| parent | e82bd25172095f1a521a95179b35cb01db7e8a62 (diff) | |
| download | Tango-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.cs | 27 |
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 |
