private void btnAdditionalMTProviders_Click(object sender, EventArgs e) { using(ProvidersDialog providersDialog = new ProvidersDialog(_controlledMTProvider)) { DialogResult result = providersDialog.ShowDialog(this); if (result == DialogResult.OK) { var selectedProviders = providersDialog.GetSelectedProviders(); foreach (var selectedProvider in selectedProviders) { clbProviders.Items.Add(new ProviderItem { Provider = selectedProvider }, false); } } } }
private void btnAdditionalMTProviders_Click(object sender, EventArgs e) { using (ProvidersDialog providersDialog = new ProvidersDialog(_controlledMTProvider)) { DialogResult result = providersDialog.ShowDialog(this); if (result == DialogResult.OK) { var selectedProviders = providersDialog.GetSelectedProviders(); foreach (var selectedProvider in selectedProviders) { clbProviders.Items.Add(new ProviderItem { Provider = selectedProvider }, false); } } } }