public RecognizerClientConnection(Socket socket)
        {
            string errMessage = "";

            Ip = ((IPEndPoint) socket.RemoteEndPoint).Address.ToString();
            Port = ((IPEndPoint)socket.RemoteEndPoint).Port;
            RecognizerInfo = RecognizerBusiness.Instance.GetRecognizerInfoByRecognizerIP(ref errMessage, Ip);
            _networkStream = new NetworkStream(socket);
            LiveRecognizerEventPacketHandle = new LiveRecognizerEventPacketHandle();
            LiveRecognizerFacePacketHandle = new LiveRecognizerFacePacketHandle();
            LiveRecognizerVehiclePacketHandle = new LiveRecognizerVehiclePacketHandle();
            _handlers = new IPacketHandler[] { LiveRecognizerEventPacketHandle, LiveRecognizerFacePacketHandle, LiveRecognizerVehiclePacketHandle };
        }
Beispiel #2
0
        public RecognizerClientConnection(Socket socket)
        {
            string errMessage = "";

            Ip             = ((IPEndPoint)socket.RemoteEndPoint).Address.ToString();
            Port           = ((IPEndPoint)socket.RemoteEndPoint).Port;
            RecognizerInfo = RecognizerBusiness.Instance.GetRecognizerInfoByRecognizerIP(ref errMessage, Ip);
            _networkStream = new NetworkStream(socket);
            LiveRecognizerEventPacketHandle   = new LiveRecognizerEventPacketHandle();
            LiveRecognizerFacePacketHandle    = new LiveRecognizerFacePacketHandle();
            LiveRecognizerVehiclePacketHandle = new LiveRecognizerVehiclePacketHandle();
            _handlers = new IPacketHandler[] { LiveRecognizerEventPacketHandle, LiveRecognizerFacePacketHandle, LiveRecognizerVehiclePacketHandle };
        }
Beispiel #3
0
 protected void ShowLiveFace(LiveRecognizerFacePacketHandle liveRecognizerFacePacket)
 {
     CrossThreadOperationControl crossAdd = delegate()
     {
         string errMsg = "";
         Face face = liveRecognizerFacePacket.CurrentFace;
         if (face==null) return;
         if (!isCameraWatched(face.CameraInfo.CameraId))return;
         listLiveFace.Insert(0, face);
         if (listLiveFace.Count > _numberOfPerPage)
         {
             listLiveFace.RemoveRange(_numberOfPerPage, listLiveFace.Count - _numberOfPerPage);
         }
         FillGridControlVehicleDetail(listLiveFace);
     };
 }