Esempio n. 1
0
 private async void Sync_Button_Click(object sender, RoutedEventArgs e)
 {
     SyncButton.IsEnabled = false;
     using (var sync = new NightSync(App.Configuration))
     {
         await Task.WhenAll(
             sync.ImportBg(),
             sync.ImportBasalProfiles(),
             sync.ImportTempBasals(),
             sync.ImportBoluses(),
             sync.ImportExtendedBoluses(),
             sync.ImportCarbs()
             );
     }
     viewModel.Update();
     SyncButton.IsEnabled = true;
 }
Esempio n. 2
0
        private async void Sync_Button_Click(object sender, RoutedEventArgs e)
        {
            SyncButton.IsEnabled = false;
            using (var sync = new NightSync(App.Configuration))
            {
                await Task.WhenAll(
                    sync.ImportBg(),
                    sync.ImportBasalProfiles(),
                    sync.ImportTempBasals(),
                    sync.ImportBoluses(),
                    sync.ImportExtendedBoluses(),
                    sync.ImportCarbs()
                    );
            }

            var csvsync = new CsvImport(App.Configuration);
            await csvsync.ImportFile(@"C:\Users\kurtl\Desktop\boluses.tsv").ConfigureAwait(true);

            await viewModel.Update();

            SyncButton.IsEnabled = true;
        }