コード例 #1
0
 //--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\
 #region --Set-, Get- Methods--
 private void SetState(BLEDeviceState state)
 {
     if (this.state != state)
     {
         BLEDeviceState oldState = this.state;
         this.state = state;
         StateChanged?.Invoke(this, new BLEDeviceStateChangedEventArgs(oldState, state));
     }
 }
コード例 #2
0
 //--------------------------------------------------------Constructor:----------------------------------------------------------------\\
 #region --Constructors--
 public BLEDeviceStateChangedEventArgs(BLEDeviceState oldState, BLEDeviceState newState)
 {
     OLD_STATE = oldState;
     NEW_STATE = newState;
 }