You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
1.1 KiB

using EC.Entity.Video;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ECMonitor.Code.Models
{
public class VideoShowModel
{
public VideoShowModel()
{
UPDateTime();
}
public string Message { get; set; }
public string CameraIp { get; set; }
public MonitorCamera Camera { get; set; }
/// <summary>
/// 控件注册名称
/// </summary>
public string UCName { get; set; }
/// <summary>
/// 更新时间
/// </summary>
private DateTime upDateTime;
public void UPDateTime()
{
upDateTime = new DateTime();
}
/// <summary>
/// 判断预警是否接触
/// </summary>
/// <returns></returns>
public bool IsTimeOut()
{
DateTime now = new DateTime();
double difSeconds = DateUnit.DateDiffSeconds(upDateTime, now);
return difSeconds > 30;
}
internal string RtspURL()
{
return Camera.RtspURL();
}
}
}