| ofs | hex dump | ascii |
|---|
| 0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 08 06 00 00 00 1f f3 ff | .PNG........IHDR................ |
| 0020 | 61 00 00 00 09 70 48 59 73 00 00 0e c4 00 00 0e c4 01 95 2b 0e 1b 00 00 01 2f 49 44 41 54 78 5e | a....pHYs..........+...../IDATx^ |
| 0040 | ed 92 3d 48 c3 40 1c c5 ff 17 3a 48 40 a4 83 76 d3 0e 5a d0 c1 10 74 cb 22 a2 93 b8 88 4e 0e a2 | ..=H.@....:H@..v..Z...t."....N.. |
| 0060 | 66 2a 2e 76 70 71 72 10 1d 5c 5c 2a a5 11 51 28 1d 44 1c 5d 6a 07 41 5d d2 ea 58 fb a5 9b 5d 5c | f*.vpqr..\\*..Q(.D.]j.A]..X...]\ |
| 0080 | c4 66 6b ff be 1c 1c 84 d0 4d 17 c1 07 3f de 90 bc 77 e4 5d 04 33 d3 4f a4 81 3f 5e 10 51 01 21 | .fk......M...?...w.].3.O..?^.Q.! |
| 00a0 | 44 cf 80 e7 79 4b b0 03 90 00 6f 60 5f d7 75 47 6d 17 09 bc 38 0e cb 01 13 94 c0 2a 18 aa be 7f | D...yK....o`_.uGm...8......*.... |
| 00c0 | 5e da 99 47 ad d4 fc a0 c9 e1 68 fc 2c 69 65 51 4a 90 13 de 20 97 ba 70 cd fe b5 3c 6d 9f bb 53 | ^..G......h.,ieQJ......p...<m..S |
| 00e0 | 08 57 c0 dd c6 c9 83 66 25 06 a9 72 b4 48 33 13 31 5a 4f df 13 b4 1b fa 04 89 79 5a ac 53 a7 cb | .W.....f%..r.H3.1ZO.......yZ.S.. |
| 0100 | 94 29 54 25 4a f9 2d 8b 62 03 7d 94 9c 1b a3 e3 9b 0a 41 f1 5e 05 4f 9b b3 a3 66 f6 b6 46 70 da | .)T%J.-.b.}.......A.^.O...f..Fp. |
| 0120 | 5b 31 64 78 e1 b0 48 e9 42 cd 0f 4b 37 46 a2 24 b7 50 62 66 1f b9 01 28 7f b5 db 0c 77 81 01 e6 | [1dx..H.B..K7F.$.Pbf...(....w... |
| 0140 | 9f 1b ad ce f4 ce 35 8b 65 87 8d d4 15 97 eb 2d ff b9 ad 72 aa 20 b8 ba 16 be 05 f0 02 18 bc 02 | ......5.e.using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
using Tango.BL.Entities;
namespace Tango.MachineStudio.Developer.Converters
{
public class SegmentToBrushConverterMulti : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
try
{
Segment segment = values[0] as Segment;
if (segment != null)
{
GradientStopCollection stops = new GradientStopCollection();
foreach (var stop in segment.BrushStops.OrderBy(x => x.StopIndex))
{
stops.Add(new GradientStop(stop.Color, stop.OffsetPercent / 100d));
}
LinearGradientBrush brush = new LinearGradientBrush();
brush.StartPoint = new Point(0, 0);
brush.EndPoint = new Point(1, 0);
brush.GradientStops = stops;
return brush;
}
return null;
}
catch
{
return null;
}
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
|