Ejemplo n.º 1
0
        /// <summary>
        /// 登录成功后调用;获取设备列表
        /// </summary>
        void procOnLoginOk()
        {
            Console.WriteLine("登录服务器 {0} 成功", m_server.ip);
            releaseReloginTimer();
            m_iLoginRetryCount = 0;
            m_bServerRetry     = true;
            int result = 0;

            for (int i = 0; i < BVCU.FAIL_RETRY_TIMES; i++)//试BVCU.FAIL_RETRY_TIMES(=10)次-L
            {
                result = BVCU.ManagedLayer_CuGetPuList(m_bvsdkHandle, m_server.sessionHandle,
                                                       m_bvsdkEventHandler.cmd_OnGetPuList);

                if (!BVCU.SUCCEEDED(result))
                {
                    Thread.Sleep(BVCU.FAIL_RETRY_INTERVAL);
                }
                else
                {
                    Console.WriteLine("获取设备列表成功");
                    return;
                }
            }

            MessageBox.Show("获取设备列表失败");
        }