public void OnBack() { RemovePeripherals(); if (_scanning) { OnScan(); // this will stop scanning } BluetoothLEHardwareInterface.DeInitialize(() => { BLETestScript.Show(PanelTypeSelection); }); }
public void OnPeripheralSelected() { if (TextName.text.Contains("RFduino")) { PanelCentralRFduino.Initialize(this); BLETestScript.Show(PanelCentralRFduino.transform); } else if (TextName.text.Contains("SensorTag")) { PanelCentralTISensorTag.Initialize(this); BLETestScript.Show(PanelCentralTISensorTag.transform); } }
public void OnBack() { if (Connected) { disconnect((Address) => { Connected = false; BLETestScript.Show(PanelCentral.transform); }); } else { BLETestScript.Show(PanelCentral.transform); } }
static public void Show (Transform panel) { if (_bleTestSCript == null) { GameObject gameObject = GameObject.Find ("Canvas"); if (gameObject != null) _bleTestSCript = gameObject.GetComponent<BLETestScript> (); } if (_bleTestSCript != null) { while (_bleTestSCript.PanelActive.childCount > 0) _bleTestSCript.PanelActive.GetChild (0).transform.SetParent (_bleTestSCript.PanelInActive); panel.SetParent (_bleTestSCript.PanelActive); } }
static public void Show(Transform panel) { if (_bleTestSCript == null) { GameObject gameObject = GameObject.Find("Canvas"); if (gameObject != null) { _bleTestSCript = gameObject.GetComponent <BLETestScript> (); } } if (_bleTestSCript != null) { while (_bleTestSCript.PanelActive.childCount > 0) { _bleTestSCript.PanelActive.GetChild(0).transform.SetParent(_bleTestSCript.PanelInActive); } panel.SetParent(_bleTestSCript.PanelActive); } }
public void OnBack() { BluetoothLEHardwareInterface.DeInitialize(() => { BLETestScript.Show(PanelTypeSelection); }); }
public void OnPeripheral() { PanelPeripheral.Initialize(); BLETestScript.Show(PanelPeripheral.gameObject.transform); }