// 构造函数 public UploadViewModel() { serInfo = new ServerInfo(); wifiSet = new WifiSet(); recived = new Recived(); datalist.Add(new WifiInfo("WHU", "2", "78", "0c:82:68:bf:01:16", 11)); datalist.Add(new WifiInfo("CS-Graduate", "3", "90", "0b:1a:68:cf:41:32", 7)); datalist.Add(new WifiInfo("ABC", "4", "72", "44:45:53:54:00:00", 9)); datalist.Add(new WifiInfo("CMCC", "1", "84", "08:00:20:0A:8C:6D", 1)); datalist.Add(new WifiInfo("JP", "0", "89", " 00:22:15:4c:5d:42", 3)); datalist.Add(new WifiInfo("CS-Faculty", "2", "86", " 14:0a:f3:4f:21:5c", 6)); }
private void ReadyRead() { Task.Run(() => { byte[] recbuffer = new byte[4096]; while (true) { int i_RtnCode = Sio_read(Gl_Int_Port, ref recbuffer[0], 4096); if (i_RtnCode > 0) { byte[] data = new byte[i_RtnCode]; for (int i = 0; i < i_RtnCode; i++) { data[i] = recbuffer[i]; } Recived?.Invoke(this, data); } Sio_flush(Gl_Int_Port, 1); } }); }
// 构造函数 public DeviceViewModel() { devInfo = new DeviceInfo(); devStatus = new DeviceStatus(); recived = new Recived(); }