コード例 #1
0
   public int UpdateRealtimeCap(RealtimeCapInfo info, string channelname)
   {
 #if !SILVERLIGHT
       send_UpdateRealtimeCap(info, channelname);
       return(recv_UpdateRealtimeCap());
 #else
       var asyncResult = Begin_UpdateRealtimeCap(null, null, info, channelname);
       return(End_UpdateRealtimeCap(asyncResult));
 #endif
   }
コード例 #2
0
    public void Read(TProtocol iprot)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            TField field;
            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        Cfg = new RealtimeCapInfo();
                        Cfg.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.String)
                    {
                        ChannelName = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
コード例 #3
0
        public void send_UpdateRealtimeCap(RealtimeCapInfo info, string channelname)
    #endif
        {
            oprot_.WriteMessageBegin(new TMessage("UpdateRealtimeCap", TMessageType.Call, seqid_));
            UpdateRealtimeCap_args args = new UpdateRealtimeCap_args();

            args.Info        = info;
            args.Channelname = channelname;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
      #if SILVERLIGHT
            return(oprot_.Transport.BeginFlush(callback, state));
      #else
            oprot_.Transport.Flush();
      #endif
        }
コード例 #4
0
        public int UpdateRealtimeCap(RealtimeCapInfo info, string channelName)
        {
            try
            {
                if (GlobalCache.AppType == 1)
                {
                    if (!channelName.Contains(GlobalCache.AppLocation))
                    {
                        return(-1);
                    }
                }
                //接收服务器附送过来的实时照片
                if (_MyCapFaceLogWithImg != null)
                {
                    _MyCapFaceLogWithImg = null;
                }
                _MyCapFaceLogWithImg    = new MyCapFaceLogWithImg();
                _MyCapFaceLogWithImg.ID = info.Id;// 抓拍id
                //string strChannelId = info.Channel.Substring(0, 6) + "\r\n";
                //strChannelId += info.Channel.Substring(0, 6);
                _MyCapFaceLogWithImg.ChannelID   = info.Channel;// 通道id
                _MyCapFaceLogWithImg.ChannelName = channelName;
                long     _longtime = info.Time;
                DateTime s         = new DateTime(1970, 1, 1);
                s = s.AddSeconds(_longtime);
                _MyCapFaceLogWithImg.time = s.ToString("yyyy/MM/dd HH:mm:ss");

                //ChannelManage.CapimageByteRealtimeCapInfo = info.Image;
                ChannelManage.snapStream           = info.Image;
                ChannelManage._MyCapFaceLogWithImg = null;
                ChannelManage._MyCapFaceLogWithImg = _MyCapFaceLogWithImg;
                ChannelManage.ResetServerRealtimeCapInfo.Set();
                info = null;

                return(0);
            }
            catch (Exception ex)
            {
                Logger <OperaExcel> .Log.Error("UpdateRealtimeCap", ex);

                return(-1);
            }
        }
コード例 #5
0
        public int UpdateRealtimeCap(RealtimeCapInfo info, string channelName)
        {
            try
            {
                if (Login.ClientType == "1")
                {
                    if (!channelName.Contains(FaceSysByMvvm.Login.ClientAreaName))
                    {
                        return(-1);
                    }
                }
                //接收服务器附送过来的实时照片
                if (_MyCapFaceLogWithImg != null)
                {
                    _MyCapFaceLogWithImg = null;
                }
                _MyCapFaceLogWithImg    = new MyCapFaceLogWithImg();
                _MyCapFaceLogWithImg.ID = info.Id;// 抓拍id
                //string strChannelId = info.Channel.Substring(0, 6) + "\r\n";
                //strChannelId += info.Channel.Substring(0, 6);
                _MyCapFaceLogWithImg.ChannelID   = info.Channel;// 通道id
                _MyCapFaceLogWithImg.ChannelName = channelName;
                long     _longtime = info.Time;
                DateTime s         = new DateTime(1970, 1, 1);
                s = s.AddSeconds(_longtime);
                _MyCapFaceLogWithImg.time = s.ToString("yyyy/MM/dd HH:mm:ss");

                ChannelManage.CapimageByteRealtimeCapInfo = info.Image;
                ChannelManage._MyCapFaceLogWithImg        = null;
                ChannelManage._MyCapFaceLogWithImg        = _MyCapFaceLogWithImg;
                ChannelManage.ResetServerRealtimeCapInfo.Set();
                info = null;

                return(0);
            }
            catch (Exception ex)
            {
                _WriteLog.WriteToLog("UpdateRealtimeCap", ex);
                return(-1);
            }
        }
コード例 #6
0
        public int UpdateRealtimeCap(RealtimeCapInfo info, string channelName)
        {
            try
            {
                if (GlobalCache.AppType == 1)
                {
                    if (!channelName.Contains(GlobalCache.AppLocation))
                    {
                        return(-1);
                    }
                }
                //接收服务器附送过来的实时照片
                if (snapPersonObj != null)
                {
                    snapPersonObj = null;
                }
                snapPersonObj             = new MyCapFaceLogWithImg();
                snapPersonObj.ID          = info.Id;      // 抓拍id
                snapPersonObj.ChannelID   = info.Channel; // 通道id
                snapPersonObj.ChannelName = channelName;
                long     _longtime = info.Time;
                DateTime s         = new DateTime(1970, 1, 1);
                s = s.AddSeconds(_longtime);
                snapPersonObj.time = s.ToString("yyyy/MM/dd HH:mm:ss");

                //ChannelManage.CapimageByteRealtimeCapInfo = info.Image;
                //ChannelManage._MyCapFaceLogWithImg = snapPersonImage;
                //ChannelManage.ResetServerRealtimeCapInfo.Set();


                info = null;

                return(0);
            }
            catch (Exception ex)
            {
                Logger <UIServerInterForWifi> .Log.Error("", ex);

                return(-1);
            }
        }
コード例 #7
0
 public IAsyncResult Begin_UpdateRealtimeCap(AsyncCallback callback, object state, RealtimeCapInfo info, string channelname)
 {
     return(send_UpdateRealtimeCap(callback, state, info, channelname));
 }
コード例 #8
0
 public IAsyncResult send_UpdateRealtimeCap(AsyncCallback callback, object state, RealtimeCapInfo info, string channelname)