Ejemplo n.º 1
0
        private async Task SendReadingAsync()
        {
            var reading = new BreathMeasurement()
            {
                Alias     = AliasBlock.Text,
                Value     = maxReading,
                TimeStamp = DateTime.Now,
            };

            globalHistory.Add(reading);

            try
            {
                if (!string.IsNullOrWhiteSpace(reading.Alias))
                {
                    await breathMeasurementTable.InsertAsync(reading);
                    await LoadDataAsync();
                }
            }
            catch (Exception ex)
            {
                await new MessageDialog(string.Format("Could not send reading: {0}", ex.Message)).ShowAsync();
            }
        }
Ejemplo n.º 2
0
 private async Task SendReadingAsync()
 {
     var reading = new BreathMeasurement()
     {
         Alias = AliasBlock.Text,
         Value = maxReading,
         TimeStamp = DateTime.Now,
     };
     if (!string.IsNullOrWhiteSpace(reading.Alias))
     {
         await breathMeasurementTable.InsertAsync(reading);
         await LoadDataAsync();
     }
     globalHistory.Add(reading);
 }
Ejemplo n.º 3
0
        private async Task SendReadingAsync()
        {
            var reading = new BreathMeasurement()
            {
                Alias = AliasBlock.Text,
                Value = maxReading,
                TimeStamp = DateTime.Now,
            };
            globalHistory.Add(reading);

            try
            { 
                if (!string.IsNullOrWhiteSpace(reading.Alias))
                {
                    await breathMeasurementTable.InsertAsync(reading);
                    await LoadDataAsync();
                }
            }
            catch (Exception ex)
            {
                await new MessageDialog(string.Format("Could not send reading: {0}", ex.Message)).ShowAsync();
            }
        }