private void btnVoiceTalk_Click(object sender, EventArgs e) { VoiceTalk dlg = new VoiceTalk(); dlg.m_lUserID = m_lUserID; dlg.m_dwAudioChanNum = m_struDeviceInfo.byAudioChanNum; dlg.ShowDialog(); }
private void btnLogin_Click(object sender, System.EventArgs e) { string DVRIPAddress = getDVRIpAddress(); if (DVRIPAddress == "" || textBoxPort.Text == "" || textBoxUserName.Text == "" || textBoxPassword.Text == "") { MessageBox.Show("Username or password empty !"); return; } Int16 DVRPortNumber = Int16.Parse(textBoxPort.Text); string DVRUserName = textBoxUserName.Text; string DVRPassword = textBoxPassword.Text; m_lUserID = CHCNetSDK.NET_DVR_Login_V30(DVRIPAddress, DVRPortNumber, DVRUserName, DVRPassword, ref m_struDeviceInfo); if (m_lUserID == -1) { DebugInfo("Login error!"); debugError(); return; } else { DebugInfo("Login Success!"); if (voiceTalkDialog == null) { voiceTalkDialog = new VoiceTalk(this); } voiceTalkDialog.m_lUserID = m_lUserID; voiceTalkDialog.m_dwAudioChanNum = m_struDeviceInfo.byAudioChanNum; } }