コード例 #1
0
        public MainViewModel(IAccelerometer accelerometer = null,
                             IGyroscope gyroscope         = null,
                             IMagnetometer magnetometer   = null,
                             ICompass compass             = null,
                             IAmbientLight ambientLight   = null,
                             IBarometer barometer         = null,
                             IPedometer pedometer         = null,
                             IProximity proximity         = null,
                             IHeartRateMonitor heartRate  = null,
                             IHumidity humidity           = null,
                             ITemperature temperature     = null)
        {
            this.Sensors = new List <ISensorViewModel>();
            this.AddIf(accelerometer, "G");
            this.AddIf(gyroscope, "G");
            this.AddIf(magnetometer, "M");
            this.AddIf(compass, "D");
            this.AddIf(ambientLight, "Light");
            this.AddIf(barometer, "Pressure");
            this.AddIf(pedometer, "Steps");
            this.AddIf(proximity, "Near");

            this.AddIf(heartRate, "Heart Rate (bpm)");
            this.AddIf(humidity, "Humidity");
            this.AddIf(temperature, "Temp");
        }
コード例 #2
0
 public MainViewModel(IAccelerometer accelerometer = null,
                      IGyroscope gyroscope         = null,
                      IMagnetometer magnetometer   = null,
                      ICompass compass             = null,
                      IAmbientLight ambientLight   = null,
                      IBarometer barometer         = null,
                      IPedometer pedometer         = null,
                      IProximity proximity         = null)
 {
     this.Sensors = new List <ISensorViewModel>();
     this.AddIf(accelerometer, "G");
     this.AddIf(gyroscope, "G");
     this.AddIf(magnetometer, "M");
     this.AddIf(compass, "D");
     this.AddIf(ambientLight, "Light");
     this.AddIf(barometer, "Pressure");
     this.AddIf(pedometer, "Steps");
     this.AddIf(proximity, "Near");
 }
コード例 #3
0
 /**
  * Set the delegate implementation.
  *
  * @param _delegate The delegate implementing platform specific functions.
  */
 public void SetDelegate(IAmbientLight _delegate)
 {
     this._delegate = _delegate;
 }
コード例 #4
0
 /**
  * Constructor with delegate.
  *
  * @param _delegate The delegate implementing platform specific functions.
  */
 public AmbientLightBridge(IAmbientLight _delegate) : base()
 {
     this._delegate = _delegate;
 }