using Prism.Mvvm; using System; using System.Collections.Generic; using System.Net; using System.Text; namespace OnlineUserPool.Model { public class HostModel : BindableBase { public IPEndPoint IPEndPoint { get; set; } private DateTime _LastActiveTime; public DateTime LastActiveTime { get { return _LastActiveTime; } set { SetProperty(ref _LastActiveTime, value); } } /// /// 地图编号 /// public int RouteId { get; set; } /// /// 用户Id /// public int MemberId { get; set; } /// /// 客户端过期 /// public bool Expire { get { return DateTime.Now.Subtract(LastActiveTime).TotalSeconds > 6000; } } public bool Equals(IPEndPoint obj) { //return base.Equals(obj); return obj.Address.ToString() == IPEndPoint.Address.ToString() && obj.Port == IPEndPoint.Port; } /// /// 需要展示的路书Id /// public List ShowRouteId { get; set; } /// /// 是否展示在线的人 /// public bool ShowVirtual { get; set; } } }