예제 #1
0
파일: AudioClient.cs 프로젝트: yswenli/SAEA
        /// <summary>
        /// 启动语音
        /// </summary>
        public void Start()
        {
            _transferClient.Connect();

            _audioPlayer.Play();

            _audioCapture.Start();
        }
예제 #2
0
        /// <summary>
        /// 启动语音
        /// </summary>
        public void Start()
        {
            _audioClient.Connect();

            _audioCapture.Play();

            _audioCapture.StartCaputure();
        }
예제 #3
0
 private void btnConnect_Click(object sender, EventArgs e)
 {
     if (transferClient == null)
     {
         transferClient = new TransferClient();
         transferClient.Connect(txtCntHost.Text.Trim(), int.Parse(txtCntPort.Text.Trim()), connectCallback);
         Enabled = false;
     }
     else
     {
         transferClient.Close();
         transferClient = null;
     }
 }
예제 #4
0
        private void ExecuteConnect()
        {
            if (transferClient == null)
            {
                transferClient = new TransferClient();
                transferClient.Connect(Host.Trim(), int.Parse(Port.Trim()), connectCallback);
            }
            else
            {
                transferClient.Close();
                transferClient = null;
            }

            sendFileCommand.RaiseCanExecuteChanged();
        }
 public void ConnectToServer()
 {
     if (transferClient == null)
     {
         transferClient = new TransferClient();
         transferClient.Connect(HostName, Port, connectCallBack);
         Enbled    = false;
         Connected = true;
     }
     else
     {
         transferClient.Close();
         transferClient = null;
         Connected      = false;
     }
 }
예제 #6
0
 private void btnConnect_Click(object sender, EventArgs e)
 {
     if (transferClient == null)
     {
         //Create our new transfer client.
         //And attempt to connect
         transferClient = new TransferClient();
         transferClient.Connect(txtCntHost.Text.Trim(), int.Parse(txtCntPort.Text.Trim()), connectCallback);
         Enabled = false;
     }
     else
     {
         //This means we're trying to disconnect.
         transferClient.Close();
         transferClient = null;
     }
 }
        private void btnConnect_Click(object sender, EventArgs e)
        {
            if (transferClient == null)
            {
                //Create our new transfer client.
                //And attempt to connect
                transferClient = new TransferClient();

                string serverIpv6Add = ConfigurationManager.AppSettings["IPV6Address"];
                string serverPortStr = ConfigurationManager.AppSettings["Port"];
                int    serverPort    = int.Parse(serverPortStr);
                //transferClient.Connect("2001:250:4800:ef:a4fe:bc62:9bc2:8f6b", 3003, connectCallback);
                transferClient.Connect(serverIpv6Add, serverPort, connectCallback);
                Enabled = false;
            }
            else
            {
                //This means we're trying to disconnect.
                transferClient.Close();
                transferClient = null;
            }
        }
 private void btnConnect_Click(object sender, EventArgs e)
 {
     if (transferClient == null)
     {
         try
         {
             //Create our new transfer client.
             //And attempt to connect
             transferClient = new TransferClient();
             transferClient.Connect("2001:250:4800:fea:f9be:b1ab:4fd5:118e", 8000, connectCallback);
             Enabled = false;
         }
         catch (Exception e0)
         {
             MessageBox.Show("conn" + e0);
         }
     }
     else
     {
         //This means we're trying to disconnect.
         transferClient.Close();
         transferClient = null;
     }
 }