diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-09-17 11:23:05 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-09-17 11:23:05 +0300 |
| commit | de2b8a223b4fa65e085fbc0995e521ddba4e9335 (patch) | |
| tree | 46823820477d840d5efe7ae0031f7a682cdf5322 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters | |
| parent | 484b966beb91cd2112433aff48b873fedd19f8f8 (diff) | |
| download | Tango-de2b8a223b4fa65e085fbc0995e521ddba4e9335.tar.gz Tango-de2b8a223b4fa65e085fbc0995e521ddba4e9335.zip | |
Moved Lubricant to the right.
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.cs | 26 |
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(); + } + } +} |
