コード例 #1
0
        /// <summary>
        /// Gets the data from the hardware and sends to the cloud
        /// </summary>
        /// <returns></returns>
        private async Task GetDataAndSend()
        {
            await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(
                CoreDispatcherPriority.Normal,
                async() =>

            {
                Hardware.UpdateSensors();
                Temperature = Hardware.Temperature - TemperatureOffset;
                Humidity    = Hardware.Humidity;

                await SendToCloud();
            });
        }