Пример #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("获取设备列表失败");
        }
Пример #2
0
        void procCreateFontInDialog(OneDialog dialog)
        {
            AfterRenderIndex idx = new AfterRenderIndex();

            idx.type         = INDEX_TYPE.FONT;
            idx.dispHandle   = dialog.panel.Handle;
            idx.dialogHandle = dialog.dialogHandle;
            if (!BVCU.SUCCEEDED(BVCU.BVDisplay_CreateFont(idx.dispHandle,
                                                          ref idx.index, 15, "Arial")))
            {
                return;
            }
            BVCU.FontDisplayMode effect = new BVCU.FontDisplayMode();
            effect.size       = BVCU.FONT_DISPLAY_MODE_SIZE;
            effect.fontColor  = new BVCU.Color(0xFFFFFFFF);
            effect.backColor  = new BVCU.Color(0xFF000000);
            effect.effect     = BVCU.BVDISPLAY_TEXT_EFFECT_OUTLINE;
            effect.effectSize = 1;
            BVCU.BVDisplay_SetFontDisplayMode(idx.dispHandle, idx.index, ref effect);
            m_afterRenderList.Add(idx);
        }