/// <summary> /// Initializes a new instance of the <see cref="Xamarin.Forms.Labs.WindowsPhoneDevice" /> class. /// </summary> private WindowsPhoneDevice() { Display = new Display(); PhoneService = new PhoneService(); Battery = new Battery(); if (Microsoft.Devices.Sensors.Accelerometer.IsSupported) { Accelerometer = new Accelerometer(); } if (Microsoft.Devices.Sensors.Gyroscope.IsSupported) { this.Gyroscope = new Gyroscope(); } MediaPicker = new MediaPicker(); }
/// <summary> /// Prevents a default instance of the <see cref="WindowsPhoneDevice"/> class from being created. /// </summary> private WindowsPhoneDevice() { Display = new Display(); PhoneService = new PhoneService(); Battery = new Battery(); if (DeviceCapabilities.IsEnabled(DeviceCapabilities.Capability.ID_CAP_SENSORS)) { if (Microsoft.Devices.Sensors.Accelerometer.IsSupported) { this.Accelerometer = new Accelerometer(); } if (Microsoft.Devices.Sensors.Gyroscope.IsSupported) { this.Gyroscope = new Gyroscope(); } } //if (DeviceCapabilities.IsEnabled(DeviceCapabilities.Capability.ID_CAP_MEDIALIB_PHOTO)) //{ // MediaPicker = new MediaPicker(); //} }
public ChargerMonitor (Battery battery) { this.battery = battery; }
public LevelMonitor (Battery battery) { this.battery = battery; }
public ChargerMonitor(Battery battery) { this.battery = battery; }
public LevelMonitor(Battery battery) { this.battery = battery; }