public SensorViewModel(string type, BandSensorBase <T> sensor)
        {
            this.sensor          = sensor;
            this.reading         = null;
            this.isSensorEnabled = false;

            Type = type;
            Sensor.ReadingChanged += (sender, e) => Reading = e.SensorReading;
        }
예제 #2
0
        public SensorViewModel(string type, BandSensorBase <T> sensor, ObservableCollection <BaseViewModel> sensors, int lines)
        {
            this.lines           = lines;
            this.sensors         = sensors;
            this.sensor          = sensor;
            this.reading         = null;
            this.isSensorEnabled = false;

            Type = type;
            Sensor.ReadingChanged += (sender, e) => Reading = e.SensorReading;
        }
 private SensorViewModel <T> CreateSensorItem <T>(string type, BandSensorBase <T> sensor)
     where T : IBandSensorReading
 {
     return(new SensorViewModel <T>(type, sensor));
 }