Esempio n. 1
0
 private void tcpAsyncServer_AcceptServer(object sender, AcceptServerEventArgs e)
 {
     this.Invoke((EventHandler)(delegate
     {
         wfComboBoxItem c = new wfComboBoxItem(e.Client.ClientSocket.RemoteEndPoint.ToString(), e.Client.key);
         int i = toolStripComboBox1.Items.Add(c);
         toolStripComboBox1.SelectedIndex = i;
     }));
 }
Esempio n. 2
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            wfComboBoxItem c = (wfComboBoxItem)toolStripComboBox1.Items[toolStripComboBox1.SelectedIndex];

            tcpAsyncServer.Send((string)c.Value, NetPacket.MakeStringPacket("dasfadsf"));
        }