private void Update_UI_IPAndID() { cbVideoType.SelectedIndex = 0; cbFileType.SelectedIndex = 0; cbBitStreamType.SelectedIndex = 0; cbQueryMode.SelectedIndex = 0; DateTime dt = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0); dtStartTimeFile.Value = dt; dtEndTimeFile.Value = DateTime.Now; dtStartTimeTime.Value = dt; dtEndTimeTime.Value = DateTime.Now; int iChannelNum = 0; NVSSDK.NetClient_GetChannelNum(m_iLogonID, ref iChannelNum); cbPassNOFile.Items.Clear(); cbPassNOFile.Items.Add("All"); for (int i = 0; i < iChannelNum; i++) { cbPassNOFile.Items.Add(i.ToString()); } if (cbPassNOFile.Items.Count > 0) { cbPassNOFile.SelectedIndex = 0; } int iAlarmChannelNo = 0, iAlarmOutPortNum = 0; int iRet = NVSSDK.NetClient_GetAlarmPortNum(m_iLogonID, ref iAlarmChannelNo, ref iAlarmOutPortNum); cbAlarmType.Items.Clear(); for (int i = 0; i < iAlarmChannelNo; i++) { cbAlarmType.Items.Add(i.ToString()); } if (cbAlarmType.Items.Count > 0) { cbAlarmType.SelectedIndex = 0; } cbPassNOTime.Items.Clear(); cbPassNOTime.Items.Add("All"); for (int i = 0; i < iChannelNum; i++) { cbPassNOTime.Items.Add(i.ToString()); } if (cbPassNOTime.Items.Count > 0) { cbPassNOTime.SelectedIndex = 0; } }