public Form1() { InitializeComponent(); LoadTheme(); udpClient.Client.Bind(new IPEndPoint(IPAddress.Any.Address, PORT)); IPEndPoint from = new IPEndPoint(0, 0); //Thread tSendInfo = new Thread(() => SendWhoIAm.sendWhoIam(udpClient,PORT,from)); //tSendInfo.Start(); tRecieveInfo = new Thread(() => MachineDiscoverer.send(udpClient, PORT, from, this)); tRecieveInfo.IsBackground = true; tRecieveInfo.Start(); pcs = new List <Machine>(); pDialogue = new ProgressDialogue("transfer", "transfer", 0); lblCredits.ForeColor = Theme.textColor; lblSettings.ForeColor = Theme.textColor; }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { MachineDiscoverer.disconnect(); }