Exemple #1
0
        } // Run

        private bool Init()
        {
            // load configuration
            var result = AppUiConfiguration.Load(null, Console.WriteLine);

            if (result.IsError)
            {
                Console.WriteLine(result.Message);
                return(false);
            } // if

            // get channels
            Console.WriteLine("Loading broadcast services");
            var providers = AppUiConfiguration.Current.Cache.LoadXml <ProviderDiscoveryRoot>("ProviderDiscovery", AppUiConfiguration.Current.ContentProvider.Bootstrap.MulticastAddress);

            ServiceProvider = UiProviderDiscovery.GetUiServiceProviderFromKey(providers, "dem_19.imagenio.es");

            var downloader = new UiBroadcastDiscoveryDownloader();

            BroadcastDiscovery = downloader.Download(null, ServiceProvider, null, true);

            ParentalGuidanceCodes = new Dictionary <string, string>();
            EpgServices           = new Dictionary <string, EpgService>();

            return(true);
        } // Init
Exemple #2
0
        }     // buttonProviderDetails_Click_Implementation

        #endregion

        public static UiServiceProvider GetLastUserSelectedProvider(string lastSelectedServiceProvider)
        {
            var lastSelectedProvider = lastSelectedServiceProvider;

            if (lastSelectedProvider == null)
            {
                return(null);
            }

            var baseIpAddress = AppUiConfiguration.Current.ContentProvider.Bootstrap.MulticastAddress;
            var discovery     = AppUiConfiguration.Current.Cache.LoadXml <ProviderDiscoveryRoot>("ProviderDiscovery", baseIpAddress);

            if (discovery == null)
            {
                return(null);
            }

            return(UiProviderDiscovery.GetUiServiceProviderFromKey(discovery, lastSelectedProvider));
        } // GetLastUserSelectedProvider