public static void Init() { auc = new AsyncUdpClient(); }
/// <summary> /// 广播 /// </summary> public static void Clientmain() { auc = new AsyncUdpClient(); auc.SendMsg(false); Console.Read(); }
/// <summary> /// 广播 /// </summary> public static void Clientmain() { auc = new AsyncUdpClient(); auc.SendMsg(false); Console.Read(); }
public static void Init() { auc = new AsyncUdpClient(); }
private void Form1_Load(object sender, EventArgs e) { picBox.Size = panel1.Size; IP = ConfigHelper.GetConfigString("IP"); port = ConfigHelper.GetConfigInt("Port"); string[] paths = ConfigHelper.GetConfigString("file").Split(new char[1] { '|' }, StringSplitOptions.RemoveEmptyEntries); foreach (string path in paths) { if (!string.IsNullOrEmpty(path)) { comboBox_fileselect.Items.Add(path); comboBox_fileselect.SelectedItem = path; if (System.IO.Path.GetExtension(path) == ".png" || System.IO.Path.GetExtension(path) == ".jpg") { lImg.Add(comboBox_fileselect.Items.Count - 1, Image.FromFile(path)); } } } //TCP连接 //S = new NewSocket(); //S.Init(IP, port); //timer2.Start(); //UDP AUC = new AsyncUdpClient(IP, port, 10010); t = new Thread(DUPSocket); t.Start(); timer3.Start(); ShowIP_label.Text = "IP:" + IP.ToString() + "|Port:" + port; }