Ejemplo n.º 1
0
 private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
 {
     while (true)
     {
         int       count;
         int       i;
         ArrayList messages;
         String    message_string;
         Console.Write("get2\n");
         count = udpPacket.ReceivePacket(buffer);
         //Console.Write(Encoding.ASCII.GetString(buffer,0,count)+ "\r\n");
         Console.Write("read:" + count.ToString() + "\n");
         if (count != 0)
         {
             messages = Osc.PacketToOscMessages(buffer, count);
             for (i = 0; i < messages.Count; i++)
             {
                 message_string = Osc.OscMessageToString((OscMessage)messages[i]);
                 //                       output_box.Text = Osc.OscMessageToString((OscMessage)messages[i]) + Environment.NewLine + output_box.Text;
                 Invoke(new add_text_delegate(add_text), message_string);
                 Console.Write(message_string + "\n");
                 Console.Write(messages.Count.ToString() + "\n");
             }
         }
     }
 }