/// <summary> /// 初始化化区域信息 /// </summary> /// <param name="_info">_info.</param> public void Init(PassengerFlowAreaInfo _info) { if (pAreaUI != null) { pAreaUI.UpdateArea(STRING(enter), STRING(sum), STRING(exit)); } if (PFURLAttrLst != null) { PFURLAttrLst.Clear(); } else { PFURLAttrLst = new List <PFURLAttr>(); } info = _info; string[] DeviceIdLst = info.CameraIdLst.Split('|'); DeviceDao dDao = new DeviceDao(); Encoding defaultEncoding = System.Text.Encoding.Default; foreach (var id in DeviceIdLst) { string[] _id = id.Split(','); dDao.Select003(_id[0]); if (dDao.Result.Count == 1) { PFURLAttr attr = new PFURLAttr(); attr.PassengerFlowUrl = dDao.Result[0].PassengerFlowUrl.Trim(); attr.InIsIn = _id[1]; attr.InIsOut = _id[2]; attr.OutIsIn = _id[3]; attr.OutIsOut = _id[4]; PFURLAttrLst.Add(attr); } } }
/// <summary> /// 初始化化区域信息 /// </summary> /// <param name="_info">_info.</param> /// <param name="_PFIShowPlane">_ PFI show plane.</param> public void Init(PassengerFlowAreaInfo _info, PassengerAreaUI _PFIShowPlane) { Logger.Instance.WriteLog("初始化客流统计信息"); PFURLAttrLst = new List <PFURLAttr>(); info = _info; if (PFInfoUI != null) { PFInfoUI.grade1 = int.Parse(info.WarnLevel1); PFInfoUI.grade2 = int.Parse(info.WarnLevel2); PFInfoUI.grade3 = int.Parse(info.WarnLevel3); } //transform.position = new Vector3(FLOAT(info.PosX),FLOAT(info.PosY),FLOAT(info.PosZ)); //transform.localScale = new Vector3(FLOAT(info.ScaleX),FLOAT(info.ScaleY),FLOAT(info.ScaleZ)); PFIShowPlane = _PFIShowPlane; string[] DeviceIdLst = info.CameraIdLst.Split('|'); Logger.Instance.WriteLog("加载相关设备信息,用来初始化客流统计信息"); DeviceDao dDao = new DeviceDao(); Encoding defaultEncoding = System.Text.Encoding.Default; foreach (var id in DeviceIdLst) { string[] _id = id.Split(','); dDao.Select003(_id[0]); if (dDao.Result.Count == 1) { PFURLAttr attr = new PFURLAttr(); attr.PassengerFlowUrl = dDao.Result[0].PassengerFlowUrl.Trim(); attr.InIsIn = _id[1]; attr.InIsOut = _id[2]; attr.OutIsIn = _id[3]; attr.OutIsOut = _id[4]; PFURLAttrLst.Add(attr); } } }