コード例 #1
0
ファイル: EpgAutoDataItem.cs プロジェクト: friendgo777/EDCB
        private string _ServiceName(int count = -1, bool withNetwork = false)
        {
            string view     = "";
            int    countAll = EpgAutoAddInfo.searchInfo.serviceList.Count;

            foreach (ulong service1 in EpgAutoAddInfo.searchInfo.serviceList.Take(count == -1 ? countAll : count))
            {
                if (view != "")
                {
                    view += ", ";
                }
                ChSet5Item chSet5Item1;
                if (ChSet5.ChList.TryGetValue(service1, out chSet5Item1) == true)
                {
                    view += chSet5Item1.ServiceName + (withNetwork == true ? "(" + CommonManager.ConvertNetworkNameText(chSet5Item1.ONID) + ")" : "");
                }
                else
                {
                    view += "?" + (withNetwork == true ? "(?)" : "");
                }
            }
            if (count != -1 && count < countAll)
            {
                view += (view == "" ? "" : ", ") + "他" + (countAll - count);
            }
            if (view == "")
            {
                view = "なし";
            }
            return(view);
        }
コード例 #2
0
ファイル: ChSet5Class.cs プロジェクト: testman13/EDCB
        public static EpgServiceInfo FromKey(UInt64 key)
        {
            if (IsSPKey(key))
            {
                return(CreateSPInfo(key));
            }

            EpgServiceInfo info = ChSet5.ChItem(key, true, true);

            if (info.Key != key)
            {
                //TSID移動前のチャンネルだった場合
                info.TSID = (ushort)(key >> 16);
            }
            else if (string.IsNullOrEmpty(info.service_name))
            {
                //ChSet5で全く見つからず、キーだけが入って戻ってきた場合
                info.network_name = CommonManager.ConvertNetworkNameText(info.ONID);
                //info.partialReceptionFlag = 0;不明
                info.remote_control_key_id = info.RemoconID();
                info.service_name          = "[不明]";
                info.service_provider_name = info.network_name;
                //info.service_type = 0x01;不明
                info.ts_name = info.network_name;
            }
            return(info);
        }
コード例 #3
0
ファイル: ChSet5Class.cs プロジェクト: testman13/EDCB
        public static EpgServiceInfo CreateSPInfo(UInt64 key)
        {
            var networks = new UInt16[] { 0x7880, 0x0004, 0x0006, 0x000A, 0x0000 };
            int idx      = Math.Min((int)(key & 0xFFFFUL), networks.Length - 1);
            var ret      = new EpgServiceInfo();

            ret.Key          = key;
            ret.ONID         = networks[idx];
            ret.network_name = CommonManager.ConvertNetworkNameText(ret.ONID, true);
            ret.service_name = string.Format("[{0}:全サービス]", ret.network_name);
            return(ret);
        }