public CarPortSetting(ParkInfo park) { ParkID = park.ParkID; CarPortUpLimit = park.TotalPosition; CarPortDownLimit = park.MinPosition; VacantPort = park.Vacant; VacantText = park.VacantText; ParkFullText = park.ParkFullText; }
public override bool Equals(object obj) { bool equal = false; if (obj is ParkInfo) { ParkInfo park = obj as ParkInfo; equal = park.ParkID == this.ParkID; } return(equal); }
/// <summary> /// 查看某个停车场是否是工作站要侦听的停车场 /// </summary> /// <param name="park"></param> /// <returns></returns> public bool IsInListenList(ParkInfo park) { foreach (EntranceInfo entrance in park.Entrances) { if (_EntranceList.Exists(e => e == entrance.EntranceID)) { return(true); } } if (park.SubParks != null && park.SubParks.Count > 0) { foreach (ParkInfo sub in park.SubParks) { if (IsInListenList(sub)) { return(true); } } } return(false); }