protected virtual void OnAvailabilityChanged(AvailabilityChangedEventArgs e) { AvailabilityChangedEventHandler handler = AvailabilityChanged; if (handler != null) { handler(this, e); } }
void lyncxClient_AvailabilityChanged(object sender, AvailabilityChangedEventArgs e) { try { mqttClient.Publish(config.AppSettings["MqttTopic"] + config.AppSettings["MqttPairingCode"], Encoding.UTF8.GetBytes(e.AvailabilityName), MqttMsgBase.QOS_LEVEL_EXACTLY_ONCE, false); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
void lyncxClient_AvailabilityChanged(object sender, AvailabilityChangedEventArgs e) { try { arduinoSerial.Set(e.Availability); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }