private async void AcquireClick(object sender, RoutedEventArgs e) { if (_clientContext == null) { await ConnectAsync(); } ICollectionResult <IInstrumentInfo> instruments = await _clientContext.GetInstrumentsAsync(); IInstrumentInfo instrument = instruments.Items.First(); ISampleInfo sampleInfo = await _clientContext.AcquireSampleAsync(instrument.Id, new ExtendedSampleAcquisitionOptions { DarkSampleOptions = DarkSampleOptions.NewDark, IntegrationTime = TimeSpan.Parse(IntegrationTimeTextBox.Text), LaserPower = int.Parse((string)((ComboBoxItem)LaserPowerComboBox.SelectedItem).Content), SampleAverageCount = int.Parse(AverageSamplesText.Text) }); _computationDependencies = await _clientContext.GetComputationDependencyInfoAsync(instrument.Id, sampleInfo); UpdatePlot(); }