Inheritance: System.EventArgs
 private void MbedServiceOnMbedStatusChanged(object sender, MbedStatusEventArgs mbedStatusEventArgs)
 {
     switch (mbedStatusEventArgs.Status)
     {
         case MbedStatus.Connected:
             OnCarControllerStatusChanged(CarControllerStatus.Connected);
             break;
         case MbedStatus.Disconnected:
         case MbedStatus.Error:
             OnCarControllerStatusChanged(CarControllerStatus.Disconnected);
             Stop();
             break;
     }
 }
示例#2
0
 public void OnMbedStatusChanged(MbedStatusEventArgs e)
 {
     EventHandler<MbedStatusEventArgs> handler = MbedStatusChanged;
     if (handler != null) handler(this, e);
 }
示例#3
0
 public void OnMbedStatusChanged(MbedStatus status)
 {
     Status = status;
     MbedStatusEventArgs e = new MbedStatusEventArgs {Status = status};
     EventHandler<MbedStatusEventArgs> handler = MbedStatusChanged;
     if (handler != null) handler(this, e);
 }