blob: 84469562904c5b5890431020a1a34fada9072194 (
plain)
| ofs | hex dump | ascii |
|---|
| 0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 01 90 00 00 01 ac 08 06 00 00 00 f3 07 f1 | .PNG........IHDR................ |
| 0020 | 1a 00 00 00 04 67 41 4d 41 00 00 b1 8e 7c fb 51 93 00 00 00 20 63 48 52 4d 00 00 87 0f 00 00 8c | .....gAMA....|.Q.....cHRM....... |
| 0040 | 0f 00 00 fd 52 00 00 81 40 00 00 7d 79 00 00 e9 8b 00 00 3c e5 00 00 19 cc 73 3c 85 77 00 00 0a | ....R...@..}y......<.....s<.w... |
| 0060 | 39 69 43 43 50 50 68 6f 74 6f 73 68 6f 70 20 49 43 43 20 70 72 6f 66 69 6c 65 00 00 48 c7 9d 96 | 9iCCPPhotoshop.ICC.profile..H... |
| 0080 | 77 54 54 d7 16 87 cf bd 77 7a a1 cd 30 02 52 86 de bb c0 00 d2 7b 93 5e 45 61 98 19 60 28 03 0e | wTT.....wz..0.R......{.^Ea..`(.. |
| 00a0 | 33 34 b1 21 a2 02 11 45 44 9a 22 48 50 c4 80 d1 50 24 56 44 b1 10 14 54 b0 07 24 08 28 31 18 45 | 34.!...ED."HP...P$VD...T..$.(1.E |
| 00c0 | 54 2c 6f 46 d6 8b aeusing 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.Statistics.Converters
{
public class JobLengthConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
try
{
if (values != null && values.Count() == 3)
{
double length = (double)values[0];
double endPoint = (double)values[1];
double width = (double)values[2];
var v = Math.Round((endPoint / length) * width, MidpointRounding.AwayFromZero);
if (double.IsInfinity(v))
{
return 0d;
}
return v;
}
}
catch { }
return 0d;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
|