Exemple #1
0
        private void GetProgressThread()
        {
            int nProgress = 0;

            while (!m_bExit)
            {
                nProgress = CHCNetSDK.NET_DVR_GetUpgradeProgress(m_lUpgradeHandle);
                if (nProgress == -1)
                {
                    break;
                }
                else
                {
                    this.Invoke(m_fnUpdateProgress, nProgress);
                    if (nProgress == 100)
                    {
                        CHCNetSDK.NET_DVR_CloseUpgradeHandle(m_lUpgradeHandle);
                        break;
                    }
                    else
                    {
                        Thread.Sleep(1000);
                    }
                }
            }
        }