// Create a Continuous Query async Task CreateContinuousQuery() { try { // Pass client connection down createCqDialog.ResetCqForm(); createCqDialog.InfluxDbClient = InfluxDbClient; createCqDialog.Database = Database; // Bind dynamic data await createCqDialog.BindInfluxDataSources(); if (createCqDialog.ShowDialog() == DialogResult.OK) { // Get the resulting CQ params var cqParams = createCqDialog.CqResult; // Create the CQ and get the response var response = await InfluxDbClient.CreateContinuousQueryAsync(cqParams); if (response.Success) { await ExecuteRequestAsync(); } else { AppForm.DisplayError(response.Body); } UpdateUIState(); } } catch (Exception ex) { AppForm.DisplayException(ex); } }