aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2018-09-26 10:01:01 +0300
committerAvi Levkovich <avi@twine-s.com>2018-09-26 10:01:01 +0300
commite99391a32439a4ce5f89fde8237cb68257f36ed0 (patch)
tree0552936f6a0994b0a18600b085234b00f649a2c9 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters
parentba1c45d36da2e15870bae36b3bdfee4271d7292f (diff)
parent94b83ea6d7e62534219801dcf1d53ee6e187837d (diff)
downloadTango-e99391a32439a4ce5f89fde8237cb68257f36ed0.tar.gz
Tango-e99391a32439a4ce5f89fde8237cb68257f36ed0.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs
new file mode 100644
index 000000000..e59141e7f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using Tango.BL;
+using Tango.BL.Enumerations;
+
+namespace Tango.MachineStudio.Developer.Converters
+{
+ public class LiquidVolumesToLubricantLiquidVolume : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ IEnumerable<LiquidVolume> liquid_volumes = value as IEnumerable<LiquidVolume>;
+ return liquid_volumes.SingleOrDefault(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.Lubricant.ToInt32());
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}