예제 #1
0
        }     // 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
예제 #2
0
        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);
        }
예제 #3
0
        }     // 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
예제 #4
0
        } // 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