void m_HumidityT_Elapsed(object sender, ElapsedEventArgs e)
 {
     if (m_Client.State == CommunicationState.Opened)
     {
         WCF_TempHumidService.MyHumidityMeasurement m = GetNewHumidityMeasurement();
         m_Client.SendNewHumidityMeasurement(m);
     }
 }
        public WCF_TempHumidService.MyHumidityMeasurement GetNewHumidityMeasurement()
        {
            WCF_TempHumidService.MyHumidityMeasurement m = new WCF_TempHumidService.MyHumidityMeasurement();
            m.MyDateTime     = DateTime.Now;
            m.MyLocationName = MyRMUnit.MyLocationName;
            Random rnd = new Random();

            m.MyValue = 980.0f + rnd.Next(40);
            return(m);
        }
 public void OnHumidityMeasurementSent(WCF_TempHumidService.MyHumidityMeasurement measurement)
 {
     Console.WriteLine("Humidity: {0}, Time: {1}, Location: {2},  RMUnitId: {3}",
                       measurement.MyValue, measurement.MyDateTime,
                       measurement.MyLocationName, MyRMUnit.MyName);
 }