private void Ble_OnScanDevicesIn(object sender, IDev e) { Device.BeginInvokeOnMainThread(() => { try { if (e.Name != null) { var n = ScanDevices.Find(x => x.Uuid == e.Uuid); if (n == null) { ScanDevices.Add(e); blelist.Add(new BleList(e.Name, e.Uuid)); } } } catch {} }); }
private async void ListView_ItemTapped(object sender, ItemTappedEventArgs e) { var n = (BleList)e.Item; foreach (var dev in ScanDevices) { if (n.Uuid == dev.Uuid) { var check = await DisplayAlert("", "Connecting to [" + dev.Name + "]", "ok", "cancel"); if (check) { ConnectDevice = dev; ConnectDevice.ConnectToDevice(); Navigation.PushAsync(new Service(), false); } } } }
public ClientList(IDev dev, int clientId, string clientIp) { Dev = dev; ClientId = clientId; ClientIp = clientIp; }
public ModPlugin(IDev plugin) { this.Plugin = plugin; }