private void cameraDeviceComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(this.cameraDeviceComboBox.Text))
     {
         return;
     }
     for (uint i = 0; i < mCameraDeviceList.getCount(); i++)
     {
         if (mCameraDeviceList.getDeviceName(i).Equals(this.cameraDeviceComboBox.Text))
         {
             mTRTCCloud.setCurrentCameraDevice(mCameraDeviceList.getDevicePID(i));
             mMainForm.OnCameraDeviceChange(mCameraDeviceList.getDevicePID(i));
         }
     }
 }
示例#2
0
 private void OnSpeakerDeviceComboBoxSelectedIndexChanged(object sender, EventArgs e)
 {
     for (uint i = 0; i < mSpeakerDeviceList.getCount(); i++)
     {
         if (mSpeakerDeviceList.getDeviceName(i).Equals(this.speakerDeviceComboBox.Text))
         {
             mTRTCCloud.setCurrentSpeakerDevice(mSpeakerDeviceList.getDevicePID(i));
             mMainForm.OnSpeakerDeviceChange(mSpeakerDeviceList.getDeviceName(i));
         }
     }
 }
 private void speakerDeviceComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(this.speakerDeviceComboBox.Text))
     {
         return;
     }
     for (uint i = 0; i < mSpeakerDeviceList.getCount(); i++)
     {
         if (mSpeakerDeviceList.getDeviceName(i).Equals(this.speakerDeviceComboBox.Text))
         {
             mDeviceManager.setCurrentDevice(TRTCDeviceType.TXMediaDeviceTypeSpeaker, mSpeakerDeviceList.getDevicePID(i));
             mMainForm.OnSpeakerDeviceChange(mSpeakerDeviceList.getDevicePID(i));
         }
     }
 }
示例#4
0
        private void RefreshSpeakerList()
        {
            if (mTRTCCloud == null)
            {
                return;
            }
            this.speakerDeviceComboBox.Items.Clear();
            mSpeakerDevice = mTRTCCloud.getCurrentSpeakerDevice();

            Log.I(String.Format("CurrentSpeakerDevice: pid = {0}, name = {1}", mSpeakerDevice.getDevicePID(), mSpeakerDevice.getDeviceName()));
            mSpeakerDeviceList = mTRTCCloud.getSpeakerDevicesList();
            for (uint i = 0; i < mSpeakerDeviceList.getCount(); i++)
            {
                this.speakerDeviceComboBox.Items.Add(mSpeakerDeviceList.getDeviceName(i));
                if (mSpeakerDevice.getDeviceName().Equals(mSpeakerDeviceList.getDeviceName(i)))
                {
                    this.speakerDeviceComboBox.SelectedIndex = (int)i;
                }
                Log.I(String.Format("SpeakerDevice{0} : name = {1}, pid = {2}", i + 1, mSpeakerDeviceList.getDeviceName(i), mSpeakerDeviceList.getDevicePID(i)));
            }
        }
示例#5
0
 private void RefreshCameraDeviceList()
 {
     if (mTRTCCloud == null)
     {
         return;
     }
     this.cameraDeviceComboBox.Items.Clear();
     mCameraDevice = mTRTCCloud.getCurrentCameraDevice();
     Log.I(String.Format("CurrentCameraDevice: pid = {0}, name = {1}", mCameraDevice.getDevicePID(), mCameraDevice.getDeviceName()));
     mCameraDeviceList = mTRTCCloud.getCameraDevicesList();
     for (uint i = 0; i < mCameraDeviceList.getCount(); i++)
     {
         this.cameraDeviceComboBox.Items.Add(mCameraDeviceList.getDeviceName(i));
         if (mCameraDevice.getDeviceName().Equals(mCameraDeviceList.getDeviceName(i)))
         {
             this.cameraDeviceComboBox.SelectedIndex = (int)i;
         }
         Log.I(String.Format("CameraDevice{0} : name = {1}, pid = {2}", i + 1, mCameraDeviceList.getDeviceName(i), mCameraDeviceList.getDevicePID(i)));
     }
     if (string.IsNullOrEmpty(mCameraDevice.getDeviceName()) && mCameraDeviceList.getCount() > 0)
     {
         this.cameraDeviceComboBox.SelectedIndex = 0;
     }
 }