20240301_JSEQ_upperpc/JiangsuEarthquakeNow/JiangsuEarthquake/Common/AspectRatioConverter.cs
XuMin 3b6c570800 1 经过电控腔测试和升压站测试;
2 解决了后一个通信连接会影响前一个通信连接的问题;
3 测试过程中存在的问题修改;
2024-09-03 16:30:34 +08:00

25 lines
698 B
C#

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace JiangsuEarthquake.Common
{
public class AspectRatioConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
double ratio = double.Parse(value.ToString()) / double.Parse(parameter.ToString());
return ratio;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}