Esempio n. 1
0
        /// <summary>
        /// Load the ATSC collection from the tuning files.
        /// </summary>
        /// <param name="directoryName">The full path of the directory containing the tuning files.</param>
        public static void Load(string directoryName)
        {
            Providers.Clear();

            DirectoryInfo directoryInfo = new DirectoryInfo(directoryName);

            foreach (FileInfo fileInfo in directoryInfo.GetFiles("*.xml"))
            {
                ClearQamProvider clearQamProvider = new ClearQamProvider(fileInfo.Name.Substring(0, fileInfo.Name.Length - 4));
                clearQamProvider.load(fileInfo);
                AddProvider(clearQamProvider);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Add a provider to the list.
        /// </summary>
        /// <param name="newProvider">The provider to be added.</param>
        public static void AddProvider(ClearQamProvider newProvider)
        {
            foreach (ClearQamProvider oldProvider in Providers)
            {
                if (oldProvider.Name == newProvider.Name)
                {
                    return;
                }

                if (oldProvider.Name.CompareTo(newProvider.Name) > 0)
                {
                    Providers.Insert(Providers.IndexOf(oldProvider), newProvider);
                    return;
                }
            }

            Providers.Add(newProvider);
        }
Esempio n. 3
0
        /// <summary>
        /// Load the ATSC collection from the tuning files.
        /// </summary>
        /// <param name="directoryName">The full path of the directory containing the tuning files.</param>
        public static void Load(string directoryName)
        {
            Providers.Clear();

            DirectoryInfo directoryInfo = new DirectoryInfo(directoryName);

            foreach (FileInfo fileInfo in directoryInfo.GetFiles("*.xml"))
            {
                ClearQamProvider clearQamProvider = new ClearQamProvider(fileInfo.Name.Substring(0, fileInfo.Name.Length - 4));
                clearQamProvider.load(fileInfo);
                AddProvider(clearQamProvider);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Add a provider to the list.
        /// </summary>
        /// <param name="newProvider">The provider to be added.</param>
        public static void AddProvider(ClearQamProvider newProvider)
        {
            foreach (ClearQamProvider oldProvider in Providers)
            {
                if (oldProvider.Name == newProvider.Name)
                    return;

                if (oldProvider.Name.CompareTo(newProvider.Name) > 0)
                {
                    Providers.Insert(Providers.IndexOf(oldProvider), newProvider);
                    return;
                }
            }

            Providers.Add(newProvider);
        }