aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-12 17:56:24 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-12 17:56:24 +0200
commitde57858a147ece47a71e288660fbf85451e396b5 (patch)
tree7a9f0cf07917a574d2954530117d26f97287c031 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters
parent12967bd645e92f7b08b8d323b93225e027ad69f0 (diff)
downloadTango-de57858a147ece47a71e288660fbf85451e396b5.tar.gz
Tango-de57858a147ece47a71e288660fbf85451e396b5.zip
Fixed issue with CMYK display on developer module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/OneToPercentConverter.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/OneToPercentConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/OneToPercentConverter.cs
new file mode 100644
index 000000000..292de5cb4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/OneToPercentConverter.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Tango.MachineStudio.Developer.Converters
+{
+ public class OneToPercentConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return System.Convert.ToDouble(value) * 100d;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return System.Convert.ToDouble(value) / 100d;
+ }
+ }
+}