コード例 #1
0
ファイル: Bluetooth.cs プロジェクト: winhoals/TinyClrLib
 /// <summary>Raises the <see cref="BluetoothStateChanged" /> event.</summary>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="btState">Current state of the Bluetooth module</param>
 protected virtual void OnBluetoothStateChanged(Bluetooth sender, BluetoothState btState)
 {
     if (_onBluetoothStateChanged == null)
     {
         _onBluetoothStateChanged = OnBluetoothStateChanged;
     }
     BluetoothStateChanged?.Invoke(sender, btState);
 }
コード例 #2
0
 /// <summary>
 /// Raises the <see cref="BluetoothStateChanged"/> event.
 /// </summary>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="btState">Current state of the Bluetooth module</param>
 protected virtual void OnBluetoothStateChanged(Bluetooth sender, BluetoothState btState)
 {
     if (onBluetoothStateChanged == null)
     {
         onBluetoothStateChanged = new BluetoothStateChangedHandler(OnBluetoothStateChanged);
     }
     if (Program.CheckAndInvoke(BluetoothStateChanged, onBluetoothStateChanged, sender, btState))
     {
         BluetoothStateChanged(sender, btState);
     }
 }
コード例 #3
0
 /// <summary>
 /// Raises the <see cref="BluetoothStateChanged"/> event.
 /// </summary>
 /// <param name="sender">The object that raised the event.</param>  
 /// <param name="btState">Current state of the Bluetooth module</param>
 protected virtual void OnBluetoothStateChanged(Bluetooth sender, BluetoothState btState)
 {
     if (onBluetoothStateChanged == null) onBluetoothStateChanged = new BluetoothStateChangedHandler(OnBluetoothStateChanged);
     if (Program.CheckAndInvoke(BluetoothStateChanged, onBluetoothStateChanged, sender, btState))
     {
         BluetoothStateChanged(sender, btState);
     }
 }