private void Form1_Closing(object sender, CancelEventArgs e) { if (server != null) { server.Dispose(); server = null; } }
public Form1() { InitializeComponent(); server = new udpServer(); server.updateEvent += new udpServer.updateEventHandler(server_updateEvent); }