1 地震仪告警记录中故障次数隐藏;电力载波机和光电交换机的供电状态隐藏; 2 除漏水和保护板事件的数据按照浮点数解析,别的按照整数解析; 3 解决TCP Server和Client存在的问题,包括无法监测到客户端连接,无法监测到服务端断开等问题;
29 lines
810 B
C#
29 lines
810 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 DateTimeConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value is DateTime dateTime)
|
|
{
|
|
// 使用自定义的时间格式,例如:"yyyy-MM-dd HH:mm:ss"
|
|
return dateTime.ToString("yyyy/MM/dd");
|
|
}
|
|
return value;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|