Exemplo n.º 1
0
        public void OnMbedStatusChanged(MbedStatusEventArgs e)
        {
            EventHandler <MbedStatusEventArgs> handler = MbedStatusChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        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;
            }
        }