diff --git a/PipeGallery/Converter/DistanceConverter.cs b/PipeGallery/Converter/DistanceConverter.cs index f2d9ce8..a2d6ff9 100644 --- a/PipeGallery/Converter/DistanceConverter.cs +++ b/PipeGallery/Converter/DistanceConverter.cs @@ -1,27 +1,23 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System; +using System.Globalization; using System.Windows.Data; namespace PipeGallery.Converter { public class DistanceConverter : IMultiValueConverter { - public object Convert(object[] value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture) { if (value.Length == 3) { - - double d0 = (double)value[0]; - double d1 = (double)value[1]; - double d2 = (double)value[2]; + double d0 = (double) value[0]; + double d1 = (double) value[1]; + double d2 = (double) value[2]; double d3 = d2 * d0 / d1; int p = System.Convert.ToInt32(parameter); - if (p==1) + if (p == 1) { d3 = d3 + 6; } @@ -29,16 +25,14 @@ { d3 = d3 - 75; } - return d3; } - return null; } - public object[] ConvertBack(object value, Type[] targetType, object parameter, System.Globalization.CultureInfo culture) + public object[] ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } -} +} \ No newline at end of file