Exemplo n.º 1
0
 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 {}
     });
 }
Exemplo n.º 2
0
        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);
                    }
                }
            }
        }
Exemplo n.º 3
0
 public ClientList(IDev dev, int clientId, string clientIp)
 {
     Dev      = dev;
     ClientId = clientId;
     ClientIp = clientIp;
 }
Exemplo n.º 4
0
 public ModPlugin(IDev plugin)
 {
     this.Plugin = plugin;
 }