/// <inheritdoc/> public void ShowIntegrateApp(IntegrationState state) { #region Sanity checks if (state == null) { throw new ArgumentNullException(nameof(state)); } #endregion var result = _wrapper.Post(form => { var integrationForm = new IntegrateAppForm(state); // The progress form and integration form take turns in being visible form.Hide(); return(integrationForm.ShowDialog()); }); if (result == DialogResult.OK) { _wrapper.Post(form => form.Show()); } else { throw new OperationCanceledException(); } }
/// <inheritdoc/> public void ShowIntegrateApp(IntegrationState state) { #region Sanity checks if (state == null) { throw new ArgumentNullException("state"); } #endregion var result = _wrapper.Post(form => { var integrationForm = new IntegrateAppForm(state); form.Visible = false; form.HideTrayIcon(); return(integrationForm.ShowDialog()); }); if (result == DialogResult.OK) { _wrapper.Post(form => form.Show()); } else { throw new OperationCanceledException(); } }