Beispiel #1
0
        public override void SetValues(MeasurementItemViewModel viewModel, ClockItemData data)
        {
            // Default to last recorded value
            String value = lastValue;

            if (data.LastBuilding == null && lastValue == null)
            {
                viewModel.NoValue();
                return;
            }
            // If we have a value populate it
            if (data.LastBuilding != null)
            {
                currentValue = Math.Round(data.LastBuilding.LAeq);
                if (Double.IsNaN(data.LastBuilding.LAeq) || currentValue < 0)
                {
                    value = "-";
                }
                else
                {
                    value = ((int)currentValue).ToString();
                }
            }


            viewModel.Value       = value;
            viewModel.Unit        = "dB";
            viewModel.Measurement = "LAeq";
            lastValue             = value;
        }
 public override void SetValues(MeasurementItemViewModel viewModel, ClockItemData data)
 {
     if (data.LastReading == null)
     {
         viewModel.NoValue();
         return;
     }
     currentValue = Math.Round(data.LastReading.LAeq, 0);
     if (currentValue <= 0)
     {
         viewModel.Value = "-";
     }
     else
     {
         viewModel.Value = ((int)currentValue).ToString();
     }
     viewModel.Unit        = "dB";
     viewModel.Measurement = "LAeq";
 }
Beispiel #3
0
        public override void SetValues(MeasurementItemViewModel viewModel, ClockItemData data)
        {
            if (data.LastReading == null)
            {
                viewModel.NoValue();
                return;
            }

            // Use building LAeq to color by for Octave values
            colorByValue = data.LastReading.GetValue(displayValue);
            if (colorByValue <= 0)
            {
                viewModel.Value = "-";
            }
            else
            {
                viewModel.Value = colorByValue.ToString("0.0");
            }
            viewModel.Unit        = "dB";
            viewModel.Measurement = GetMeasurement();
        }
 public override void SetValues(MeasurementItemViewModel viewModel, ClockItemData data)
 {
     viewModel.Value       = (data.NextReadingTime - DateTime.Now).ToString(@"mm\:ss", null);
     viewModel.Unit        = "";
     viewModel.Measurement = "";
 }
Beispiel #5
0
 public override void SetValues(MeasurementItemViewModel viewModel, ClockItemData data)
 {
     viewModel.Clear();
 }