diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-03-04 15:28:15 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-03-04 15:28:15 +0200 |
| commit | 2b8e41b5279c2d3ab370595f6593b64ea734ef87 (patch) | |
| tree | 084ceaae9e1b65454e9e2264ce6fdb0511ca4cf9 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters | |
| parent | d734bb5cf08ba2433b74fc86a8858d2437d1a237 (diff) | |
| download | Tango-2b8e41b5279c2d3ab370595f6593b64ea734ef87.tar.gz Tango-2b8e41b5279c2d3ab370595f6593b64ea734ef87.zip | |
Implemented job embroidery image capture, display export,
Implemented running job text to speech.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/ByteArrayToBitmapSourceConverter.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/ByteArrayToBitmapSourceConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/ByteArrayToBitmapSourceConverter.cs new file mode 100644 index 000000000..d839b0060 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/ByteArrayToBitmapSourceConverter.cs @@ -0,0 +1,29 @@ +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 ByteArrayToBitmapSourceConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + byte[] bytes = value as byte[]; + if (bytes != null) + { + return bytes.ToBitmapSource(); + } + + return value; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} |
