} // class MappedService protected IEnumerable <UiServiceProvider> GetProviders() { var baseIpAddress = AppUiConfiguration.Current.ContentProvider.Bootstrap.MulticastAddress; var discoveryXml = AppUiConfiguration.Current.Cache.LoadXml <ProviderDiscoveryRoot>("ProviderDiscovery", baseIpAddress); if (discoveryXml == null) { using (var dialog = new SelectProviderDialog()) { dialog.ShowDialog(Owner); discoveryXml = AppUiConfiguration.Current.Cache.LoadXml <ProviderDiscoveryRoot>("ProviderDiscovery", baseIpAddress); if (discoveryXml == null) { return(null); } } // using dialog } // if var providers = from discovery in discoveryXml.ServiceProviderDiscovery from provider in discovery.Providers let uiProvider = new UiServiceProvider(provider) select uiProvider; return(providers); } // GetProviders
public DbProvider SelectProvider() { DbProvider provider = null; using (SelectProviderDialog providerDialog = new SelectProviderDialog()) { FormExtensions.DownPositionate(providerDialog, this.toolStrip); if (providerDialog.ShowDialog(this) == DialogResult.OK) { provider = providerDialog.Provider; } } return(provider); }
} // Implementation_menuItemProviderDetails_Click private void SelectProvider() { using (var dialog = new SelectProviderDialog()) { dialog.SelectedServiceProvider = SelectedServiceProvider; var result = dialog.ShowDialog(this); BasicGoogleTelemetry.SendScreenHit(this); if (result != DialogResult.OK) { return; } SelectedServiceProvider = dialog.SelectedServiceProvider; ServiceProviderChanged(); } // dialog } // SelectProvider
} // LoadDisplayProgress private bool SelectProvider(bool useSelected = true) { if ((SelectedServiceProvider != null) && (useSelected)) { return(true); } using (var dialog = new SelectProviderDialog()) { dialog.SelectedServiceProvider = SelectedServiceProvider; var result = dialog.ShowDialog(this); if (result != DialogResult.OK) { return(false); } SelectedServiceProvider = dialog.SelectedServiceProvider; labelServiceProvider.Text = SelectedServiceProvider.DisplayName; } // using dialog return(true); } // SelectProvider