示例#1
0
        void Barometer_ReadingChanged(object sender, BarometerChangedEventArgs e)
        {
            var data      = e.Reading;
            var barometer = FindViewById <TextView>(Resource.Id.barometer);

            barometer.Text = "Pressure: " + data.PressureInHectopascals;
        }
示例#2
0
        void Barometer_ReadingChanged(object sender, BarometerChangedEventArgs e)
        {
            var data = e.Reading;

            // Process Pressure
            Console.WriteLine($"Reading: Pressure: {data.PressureInHectopascals} hectopascals");
            label.Text = String.Format("Pressure: {0,0:F4}", data.PressureInHectopascals);
        }
 private void Pressure_DataUpdated(object sender, BarometerChangedEventArgs e)
 {
     Model.Pressure = (float)e.Reading.PressureInHectopascals;
     canvas.Series[0].Points.Add(new Extensions.Point()
     {
         Ticks = DateTime.UtcNow.Ticks, Value = (float)e.Reading.PressureInHectopascals
     });
     canvas.InvalidateSurface();
 }
示例#4
0
        public void Barometer_ReadingChanged(object sender, BarometerChangedEventArgs e)
        {
            var    data             = e.Reading;
            double seaLevelPressure = 1013;

            CurrentPressure = data.PressureInHectopascals;

            CurrentAltitude = 44307.694 * (1 - Math.Pow(CurrentPressure / seaLevelPressure, 0.190284));
        }
示例#5
0
        private void Barometer_ReadingChanged(object sender, BarometerChangedEventArgs e)
        {
            Xamarin.Essentials.BarometerData reading = e.Reading;
            DoubleData data = Pressure;

            data.TimeStamp = DateTime.UtcNow;
            data.Value     = reading.PressureInHectopascals;
            data.SendNotification();
        }
示例#6
0
        void RaiseReadingChanged(BarometerData reading)
        {
            var args = new BarometerChangedEventArgs(reading);

            if (UseSyncContext)
            {
                MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(this, args));
            }
            else
            {
                ReadingChanged?.Invoke(this, args);
            }
        }
        void Barometer_ReadingChanged(object sender, BarometerChangedEventArgs e)
        {
            var data = e.Reading;
            var item = new ItemBarometer
            {
                DateInfo = DateTime.Now.ToString(),
                Pressure = "Pressure: " + data.PressureInHectopascals + " hectopascals"
            };

            Calculos.Insert(0, item);
            ListViewCheck.ItemsSource = Calculos;
            if (Compass.IsMonitoring)
            {
                Compass.Stop();
            }
        }
示例#8
0
 private void Barometer_ReadingChanged(object sender, BarometerChangedEventArgs e)
 {
     Data  = e.Reading;
     Text  = Data.PressureInHectopascals.ToString(CultureInfo.CurrentCulture);
     Value = Data.PressureInHectopascals;
 }
 void Barometer_ReadingChanged(object sender, BarometerChangedEventArgs e)
 {
     MainThread.BeginInvokeOnMainThread(() => {
         pressureLabel.Text = e.Reading.PressureInHectopascals.ToString();
     });
 }
示例#10
0
 private void barometer_ReadingChanged(object sender, BarometerChangedEventArgs e)
 {
     showBarometer(e.Reading.PressureInHectopascals);
 }
        void Barometer_ReadingChanged(object sender, BarometerChangedEventArgs e)
        {
            var data = e.Reading;

            BarometerString = ($"Mesure: Pressure: {data.PressureInHectopascals} hectopascals");
        }
 private void OnReadingChanged(object sender, BarometerChangedEventArgs e)
 {
     CurrentPressure = e.Reading.PressureInHectopascals;
     CurrentAltitude = GetAltitudeInMetres(CurrentPressure, SeaLevelPressure);
 }
示例#13
0
 private void Barometer_ReadingChanged(object sender, BarometerChangedEventArgs e)
 {
     this.BarometerData = e.Reading;
 }