Example #1
0
        private void UdpSenderBtn_Click(object sender, RoutedEventArgs e)
        {
            Thread t = new Thread(() => {
                UdpSender udpSender = new UdpSender();
                udpSender.SenderStart(new string[] { "-p", "9400", "-h", "localhost" });
            });

            t.SetApartmentState(ApartmentState.MTA);
            t.Start();
        }