Exemplo n.º 1
0
 void cardia_NetworkMessageReceived(object sender, HeartRateMessage message)
 {
     this.Invoke((MethodInvoker)(
                     delegate()
     {
         displays[message.ClientId].BPM = message.BPM;
         displays[message.ClientId].MinBPM = message.MinBPM;
         displays[message.ClientId].MaxBPM = message.MaxBPM;
     }
                     ));
 }
Exemplo n.º 2
0
        private void networkProvider_OnClientMessageReceived(object sender, HeartRateMessage heartRateMessage)
        {
#if DEBUG
            System.Diagnostics.Debug.WriteLine("HRM message received - BPM: " + heartRateMessage.BPM);
#endif

            generators[heartRateMessage.ClientId].BPM = heartRateMessage.BPM ?? 0;

            if (NetworkMessageReceived != null)
            {
                NetworkMessageReceived(this, heartRateMessage);
            }
        }