Exemple #1
0
 public void Init(CharacteristicInfo characteristicInfo, BLEExample bLEExample)
 {
     this.characteristicInfo = characteristicInfo;
     this.bLEExample         = bLEExample;
     transform.GetChild(0).GetComponent <Text>().text             = characteristicInfo.ServiceUUID;
     transform.GetChild(0).GetChild(0).GetComponent <Text>().text = characteristicInfo.UUID;
     transform.GetChild(3).GetComponent <Button>().onClick.AddListener(() =>
     {
         this.bLEExample.DeviceInfoToCharacterInfo(characteristicInfo);
     });
 }
 public void Init(BLEDeviceInfo bLEScanDeviceInfo, BLEExample bLEExample)
 {
     DeviceNameText = transform.GetChild(0).GetComponent <Text>();
     MACAddressText = transform.GetChild(1).GetComponent <Text>();
     RssiText       = transform.GetChild(5).GetComponent <Text>();
     RssiFillImg    = transform.GetChild(3).GetComponent <Image>();
     transform.GetChild(6).GetComponent <Button>().onClick.AddListener(ConnectDevice);
     rssiI = transform.GetChild(4).gameObject;
     UpdateInfo(bLEScanDeviceInfo);
     this.bLEExample = bLEExample;
 }
Exemple #3
0
 public void Init(CharacteristicInfo characteristicInfo, BLEExample bLEExample)
 {
     this.characteristicInfo = characteristicInfo;
     this.bLEExample         = bLEExample;
 }