void DisConnectBackCallFunc(int lLoginID, string pchDVRIP, int nDVRPort, IntPtr dwUser) { Debug.WriteLine(DateTime.Now.ToString("HH:mm:ss - ") + DateTime.Now.ToString("HH:mm:ss - ") + TAG + ".DisConnectBackCallFunc(" + lLoginID.ToString() + "," + pchDVRIP + "," + nDVRPort.ToString() + ",dwUser" + ")", "DVR INFO"); isConnected = false; chanelOpened = 0; for (int i = 0; i < 16; i++) { if (lLoginID == m_videoform[i].GetLoginHandle()) { m_videoform[i].OnDisconnct(); } } foreach (DEV_INFO devinfo in dictDevInfo.Values) { if (devinfo.lLoginID == lLoginID) { XMSDK.H264_DVR_Logout(lLoginID); dictDevInfo.Remove(devinfo.lLoginID); dictDiscontDev.Add(devinfo.lLoginID, devinfo); break; } } if (dictDiscontDev.Count > 0) { timerDisconnect.Enabled = true; timerDisconnect.Start(); } }
private void DVR2Mjpeg_FormClosed(object sender, FormClosedEventArgs e) { foreach (DEV_INFO devinfo in dictDevInfo.Values) { XMSDK.H264_DVR_Logout(devinfo.lLoginID); } timerDisconnect.Stop(); }