Esempio n. 1
0
        public String ConvertProgramText(EpgEventInfo eventInfo, EventInfoTextMode textMode)
        {
            string retText   = "";
            string basicInfo = "";
            string extInfo   = "";

            if (eventInfo != null)
            {
                UInt64 key = Create64Key(eventInfo.original_network_id, eventInfo.transport_stream_id, eventInfo.service_id);
                if (ChSet5.Instance.ChList.ContainsKey(key) == true)
                {
                    basicInfo += ChSet5.Instance.ChList[key].ServiceName + "(" + ChSet5.Instance.ChList[key].NetworkName + ")" + "\r\n";
                }

                basicInfo += new TimeDuration(eventInfo.StartTimeFlag != 0, eventInfo.start_time,
                                              eventInfo.DurationFlag != 0, eventInfo.durationSec) + "\r\n";

                if (eventInfo.ShortInfo != null)
                {
                    basicInfo += eventInfo.ShortInfo.event_name + "\r\n\r\n";
                    extInfo   += eventInfo.ShortInfo.text_char + "\r\n\r\n";
                }

                if (eventInfo.ExtInfo != null)
                {
                    extInfo += eventInfo.ExtInfo.text_char + "\r\n\r\n";
                }

                //ジャンル
                extInfo += "ジャンル :\r\n";
                if (eventInfo.ContentInfo != null)
                {
                    foreach (EpgContentData info in eventInfo.ContentInfo.nibbleList)
                    {
                        String content = "";
                        int    nibble1 = info.content_nibble_level_1;
                        int    nibble2 = info.content_nibble_level_2;
                        if (nibble1 == 0x0E && nibble2 <= 0x01)
                        {
                            nibble1 = info.user_nibble_1 | (0x60 + nibble2 * 16);
                            nibble2 = info.user_nibble_2;
                        }
                        if (ContentKindDictionary.ContainsKey((ushort)(nibble1 << 8 | 0xFF)))
                        {
                            content += ContentKindDictionary[(ushort)(nibble1 << 8 | 0xFF)];
                        }
                        else
                        {
                            content += "(0x" + nibble1.ToString("X2") + ")";
                        }
                        if (ContentKindDictionary.ContainsKey((ushort)(nibble1 << 8 | nibble2)))
                        {
                            content += " - " + ContentKindDictionary[(ushort)(nibble1 << 8 | nibble2)];
                        }
                        else if (nibble1 != 0x0F)
                        {
                            content += " - (0x" + nibble2.ToString("X2") + ")";
                        }
                        extInfo += content + "\r\n";
                    }
                }
                extInfo += "\r\n";

                //映像
                extInfo += "映像 :";
                if (eventInfo.ComponentInfo != null)
                {
                    int    streamContent = eventInfo.ComponentInfo.stream_content;
                    int    componentType = eventInfo.ComponentInfo.component_type;
                    UInt16 componentKey  = (UInt16)(streamContent << 8 | componentType);
                    if (ComponentKindDictionary.ContainsKey(componentKey) == true)
                    {
                        extInfo += ComponentKindDictionary[componentKey];
                    }
                    if (eventInfo.ComponentInfo.text_char.Length > 0)
                    {
                        extInfo += "\r\n";
                        extInfo += eventInfo.ComponentInfo.text_char;
                    }
                }
                extInfo += "\r\n";

                //音声
                extInfo += "音声 :\r\n";
                if (eventInfo.AudioInfo != null)
                {
                    foreach (EpgAudioComponentInfoData info in eventInfo.AudioInfo.componentList)
                    {
                        int    streamContent = info.stream_content;
                        int    componentType = info.component_type;
                        UInt16 componentKey  = (UInt16)(streamContent << 8 | componentType);
                        if (ComponentKindDictionary.ContainsKey(componentKey) == true)
                        {
                            extInfo += ComponentKindDictionary[componentKey];
                        }
                        if (info.text_char.Length > 0)
                        {
                            extInfo += "\r\n";
                            extInfo += info.text_char;
                        }
                        extInfo += "\r\n";
                        extInfo += "サンプリングレート :";
                        switch (info.sampling_rate)
                        {
                        case 1:
                            extInfo += "16kHz";
                            break;

                        case 2:
                            extInfo += "22.05kHz";
                            break;

                        case 3:
                            extInfo += "24kHz";
                            break;

                        case 5:
                            extInfo += "32kHz";
                            break;

                        case 6:
                            extInfo += "44.1kHz";
                            break;

                        case 7:
                            extInfo += "48kHz";
                            break;

                        default:
                            break;
                        }
                        extInfo += "\r\n";
                    }
                }
                extInfo += "\r\n";

                //スクランブル
                if (!ChSet5.IsDttv(eventInfo.original_network_id))
                {
                    if (eventInfo.FreeCAFlag == 0)
                    {
                        extInfo += "無料放送\r\n";
                    }
                    else
                    {
                        extInfo += "有料放送\r\n";
                    }
                    extInfo += "\r\n";
                }

                //イベントリレー
                if (eventInfo.EventRelayInfo != null)
                {
                    if (eventInfo.EventRelayInfo.eventDataList.Count > 0)
                    {
                        extInfo += "イベントリレーあり:\r\n";
                        foreach (EpgEventData info in eventInfo.EventRelayInfo.eventDataList)
                        {
                            key = Create64Key(info.original_network_id, info.transport_stream_id, info.service_id);
                            if (ChSet5.Instance.ChList.ContainsKey(key) == true)
                            {
                                extInfo += ChSet5.Instance.ChList[key].ServiceName + "(" + ChSet5.Instance.ChList[key].NetworkName + ")" + " ";
                            }
                            else
                            {
                                extInfo += "OriginalNetworkID : " + info.original_network_id.ToString() + " (0x" + info.original_network_id.ToString("X4") + ") ";
                                extInfo += "TransportStreamID : " + info.transport_stream_id.ToString() + " (0x" + info.transport_stream_id.ToString("X4") + ") ";
                                extInfo += "ServiceID : " + info.service_id.ToString() + " (0x" + info.service_id.ToString("X4") + ") ";
                            }
                            extInfo += "EventID : " + info.event_id.ToString() + " (0x" + info.event_id.ToString("X4") + ")\r\n";
                            extInfo += "\r\n";
                        }
                        extInfo += "\r\n";
                    }
                }

                extInfo += "OriginalNetworkID : " + eventInfo.original_network_id.ToString() + " (0x" + eventInfo.original_network_id.ToString("X4") + ")\r\n";
                extInfo += "TransportStreamID : " + eventInfo.transport_stream_id.ToString() + " (0x" + eventInfo.transport_stream_id.ToString("X4") + ")\r\n";
                extInfo += "ServiceID : " + eventInfo.service_id.ToString() + " (0x" + eventInfo.service_id.ToString("X4") + ")\r\n";
                extInfo += "EventID : " + eventInfo.event_id.ToString() + " (0x" + eventInfo.event_id.ToString("X4") + ")\r\n";
            }

            if (textMode == EventInfoTextMode.All || textMode == EventInfoTextMode.BasicOnly)
            {
                retText = basicInfo;
            }
            if (textMode == EventInfoTextMode.All || textMode == EventInfoTextMode.ExtOnly)
            {
                retText += extInfo;
            }
            return(retText);
        }
Esempio n. 2
0
        public static FlowDocument ConvertProgramText(EpgEventInfo eventInfo, EventInfoTextMode textMode)
        {
            if (eventInfo == null)
            {
                return(null);
            }

            FlowDocument flowDoc1 = new FlowDocument()
            {
                FontFamily = new FontFamily("メイリオ"),
                FontSize   = 11,
                Foreground = new SolidColorBrush(Color.FromRgb(10, 10, 100)),
            };
            Paragraph p_basicInfo1  = new Paragraph();
            Section   sctn_ExtInfo1 = new Section();

            string serviceName1 = null;
            UInt64 key          = eventInfo.Create64Key();

            if (ChSet5.ChList.ContainsKey(key) == true)
            {
                serviceName1 = ChSet5.ChList[key].service_name + "(" + ChSet5.ChList[key].network_name + ")";
            }

            string date1 = null;

            if (eventInfo.StartTimeFlag == 1)
            {
                date1 = CommonManager.ConvertTimeText(eventInfo.start_time, false, true) + " ~ ";
            }
            else
            {
                date1 = "未定 ~ ";
            }
            if (eventInfo.DurationFlag == 1)
            {
                DateTime endTime = eventInfo.start_time + TimeSpan.FromSeconds(eventInfo.durationSec);
                date1 += CommonManager.ConvertTimeText(endTime, true, true);
            }
            else
            {
                date1 += "未定";
            }

            if (eventInfo.ShortInfo != null)
            {
                Inline event_name1 = new Bold(
                    new Run(eventInfo.ShortInfo.event_name + Environment.NewLine))
                {
                    FontSize = 12
                };
                p_basicInfo1.Inlines.Add(event_name1);
                //
                if (!string.IsNullOrWhiteSpace(date1))
                {
                    p_basicInfo1.Inlines.Add(new Run(date1 + Environment.NewLine));
                }
                if (!string.IsNullOrWhiteSpace(serviceName1))
                {
                    p_basicInfo1.Inlines.Add(new Run(serviceName1));
                }
                addParagraph(eventInfo.ShortInfo.text_char, sctn_ExtInfo1, 0);
            }

            if (eventInfo.ExtInfo != null)
            {
                addParagraph(eventInfo.ExtInfo.text_char, sctn_ExtInfo1, 0);
            }

            //ジャンル
            Section sctn_Genre1 = addSection(sctn_ExtInfo1);

            addParagraph("ジャンル:", sctn_Genre1, 0);
            if (eventInfo.ContentInfo != null)
            {
                var contentList = new List <ContentKindInfo>();
                if (eventInfo.ContentInfo != null)
                {
                    contentList = eventInfo.ContentInfo.nibbleList.Select(data => CommonManager.ContentKindInfoForDisplay(data)).ToList();
                }
                foreach (ContentKindInfo info in contentList.Where(info => info.Data.IsAttributeInfo == false))
                {
                    addParagraph(info.ListBoxView, sctn_Genre1);
                }
            }

            //映像
            Section sctn_ComponentInfo1 = addSection(sctn_ExtInfo1);

            addParagraph("映像:", sctn_ComponentInfo1, 0);
            if (eventInfo.ComponentInfo != null)
            {
                StringBuilder sb1           = new StringBuilder();
                int           streamContent = eventInfo.ComponentInfo.stream_content;
                int           componentType = eventInfo.ComponentInfo.component_type;
                UInt16        componentKey  = (UInt16)(streamContent << 8 | componentType);
                if (CommonManager.ComponentKindDictionary.ContainsKey(componentKey) == true)
                {
                    addParagraph(CommonManager.ComponentKindDictionary[componentKey], sctn_ComponentInfo1);
                }
                if (eventInfo.ComponentInfo.text_char.Length > 0)
                {
                    addParagraph(eventInfo.ComponentInfo.text_char, sctn_ComponentInfo1);
                }
            }

            //音声
            Section sctn_AudioInfo1 = addSection(sctn_ExtInfo1);

            addParagraph("音声:", sctn_AudioInfo1, 0);
            if (eventInfo.AudioInfo != null)
            {
                foreach (EpgAudioComponentInfoData info in eventInfo.AudioInfo.componentList)
                {
                    StringBuilder sb1           = new StringBuilder();
                    int           streamContent = info.stream_content;
                    int           componentType = info.component_type;
                    UInt16        componentKey  = (UInt16)(streamContent << 8 | componentType);
                    if (CommonManager.ComponentKindDictionary.ContainsKey(componentKey) == true)
                    {
                        sb1.AppendLine(CommonManager.ComponentKindDictionary[componentKey]);
                    }
                    if (info.text_char.Length > 0)
                    {
                        sb1.AppendLine(info.text_char);
                    }
                    string samplingRate1 = "サンプリングレート: ";
                    switch (info.sampling_rate)
                    {
                    case 1:
                        samplingRate1 += "16kHz";
                        break;

                    case 2:
                        samplingRate1 += "22.05kHz";
                        break;

                    case 3:
                        samplingRate1 += "24kHz";
                        break;

                    case 5:
                        samplingRate1 += "32kHz";
                        break;

                    case 6:
                        samplingRate1 += "44.1kHz";
                        break;

                    case 7:
                        samplingRate1 += "48kHz";
                        break;

                    default:
                        break;
                    }
                    sb1.Append(samplingRate1);
                    double marginTop1 = 0;
                    if (1 < sctn_AudioInfo1.Blocks.Count)
                    {
                        marginTop1 = 5;
                    }
                    addParagraph(sb1.ToString(), sctn_AudioInfo1, marginTop0: marginTop1);
                }
            }
            {
                Section sctn_ID1 = addSection(sctn_ExtInfo1);
                addParagraph("OriginalNetworkID : " + eventInfo.original_network_id.ToString() + " (0x" + eventInfo.original_network_id.ToString("X4") + ")", sctn_ID1, 0);
                addParagraph("TransportStreamID : " + eventInfo.transport_stream_id.ToString() + " (0x" + eventInfo.transport_stream_id.ToString("X4") + ")", sctn_ID1, 0);
                addParagraph("ServiceID : " + eventInfo.service_id.ToString() + " (0x" + eventInfo.service_id.ToString("X4") + ")", sctn_ID1, 0);
                addParagraph("EventID : " + eventInfo.event_id.ToString() + " (0x" + eventInfo.event_id.ToString("X4") + ")", sctn_ID1, 0);
            }
            if (textMode == EventInfoTextMode.All || textMode == EventInfoTextMode.BasicOnly)
            {
                flowDoc1.Blocks.Add(p_basicInfo1);
            }
            if (textMode == EventInfoTextMode.All)
            {
                flowDoc1.Blocks.Add(sctn_ExtInfo1);
            }

            return(flowDoc1);
        }
Esempio n. 3
0
        public String ConvertProgramText(EpgEventInfo eventInfo, EventInfoTextMode textMode)
        {
            string retText = "";
            string basicInfo = "";
            string extInfo = "";
            if (eventInfo != null)
            {
                UInt64 key = ((UInt64)eventInfo.original_network_id) << 32 |
                    ((UInt64)eventInfo.transport_stream_id) << 16 |
                    ((UInt64)eventInfo.service_id);
                if (ChSet5.Instance.ChList.ContainsKey(key) == true)
                {
                    basicInfo += ChSet5.Instance.ChList[key].ServiceName + "(" + ChSet5.Instance.ChList[key].NetworkName + ")" + "\r\n";
                }

                if (eventInfo.StartTimeFlag == 1)
                {
                    basicInfo += eventInfo.start_time.ToString("yyyy/MM/dd(ddd) HH:mm:ss ~ ");
                }
                else
                {
                    basicInfo += "未定 ~ ";
                }
                if (eventInfo.DurationFlag == 1)
                {
                    DateTime endTime = eventInfo.start_time + TimeSpan.FromSeconds(eventInfo.durationSec);
                    basicInfo += endTime.ToString("yyyy/MM/dd(ddd) HH:mm:ss") + "\r\n";
                }
                else
                {
                    basicInfo += "未定\r\n";
                }

                if (eventInfo.ShortInfo != null)
                {
                    basicInfo += eventInfo.ShortInfo.event_name + "\r\n\r\n";
                    extInfo += eventInfo.ShortInfo.text_char + "\r\n\r\n";
                }

                if (eventInfo.ExtInfo != null)
                {
                    extInfo += eventInfo.ExtInfo.text_char + "\r\n\r\n";
                }

                //ジャンル
                extInfo += "ジャンル :\r\n";
                if (eventInfo.ContentInfo != null)
                {
                    foreach (EpgContentData info in eventInfo.ContentInfo.nibbleList)
                    {
                        String content = "";
                        int nibble1 = info.content_nibble_level_1;
                        int nibble2 = info.content_nibble_level_2;
                        if (nibble1 == 0x0E && nibble2 == 0x01)
                        {
                            nibble1 = info.user_nibble_1;
                            nibble2 = info.user_nibble_2;
                            UInt16 contentKey1 = (UInt16)(nibble1 << 8 | 0xFF);
                            UInt16 contentKey2 = (UInt16)(nibble1 << 8 | nibble2);
                            if (ContentKindDictionary2.ContainsKey(contentKey1) == true)
                            {
                                content += ContentKindDictionary2[contentKey1];
                            }
                            if (ContentKindDictionary2.ContainsKey(contentKey2) == true)
                            {
                                content += " - " + ContentKindDictionary2[contentKey2];
                            }
                            if (content.Length == 0 || nibble1 == 0x0F)
                            {
                                content += "(0x" + info.user_nibble_1.ToString("X2") + info.user_nibble_2.ToString("X2") + ")" + "(0x" + info.user_nibble_1.ToString("X2") + info.user_nibble_2.ToString("X2") + ")";
                            }
                            extInfo += content + "\r\n";
                        }
                        else
                        {
                            UInt16 contentKey1 = (UInt16)(nibble1 << 8 | 0xFF);
                            UInt16 contentKey2 = (UInt16)(nibble1 << 8 | nibble2);
                            if (ContentKindDictionary.ContainsKey(contentKey1) == true)
                            {
                                content += ContentKindDictionary[contentKey1];
                            }
                            if (ContentKindDictionary.ContainsKey(contentKey2) == true)
                            {
                                content += " - " + ContentKindDictionary[contentKey2];
                            }
                            if (content.Length == 0 || nibble1 == 0x0F)
                            {
                                content += "(0x" + nibble1.ToString("X2") + nibble2.ToString("X2") + ")" + "(0x" + info.user_nibble_1.ToString("X2") + info.user_nibble_2.ToString("X2") + ")";
                            }
                            extInfo += content + "\r\n";
                        }
                    }
                }
                extInfo += "\r\n";

                //映像
                extInfo += "映像 :";
                if (eventInfo.ComponentInfo != null)
                {
                    int streamContent = eventInfo.ComponentInfo.stream_content;
                    int componentType = eventInfo.ComponentInfo.component_type;
                    UInt16 componentKey = (UInt16)(streamContent << 8 | componentType);
                    if (ComponentKindDictionary.ContainsKey(componentKey) == true)
                    {
                        extInfo += ComponentKindDictionary[componentKey];
                    }
                    if (eventInfo.ComponentInfo.text_char.Length > 0)
                    {
                        extInfo += "\r\n";
                        extInfo += eventInfo.ComponentInfo.text_char;
                    }
                }
                extInfo += "\r\n";

                //音声
                extInfo += "音声 :\r\n";
                if (eventInfo.AudioInfo != null)
                {
                    foreach (EpgAudioComponentInfoData info in eventInfo.AudioInfo.componentList)
                    {
                        int streamContent = info.stream_content;
                        int componentType = info.component_type;
                        UInt16 componentKey = (UInt16)(streamContent << 8 | componentType);
                        if (ComponentKindDictionary.ContainsKey(componentKey) == true)
                        {
                            extInfo += ComponentKindDictionary[componentKey];
                        }
                        if (info.text_char.Length > 0)
                        {
                            extInfo += "\r\n";
                            extInfo += info.text_char;
                        }
                        extInfo += "\r\n";
                        extInfo += "サンプリングレート :";
                        switch (info.sampling_rate)
                        {
                            case 1:
                                extInfo += "16kHz";
                                break;
                            case 2:
                                extInfo += "22.05kHz";
                                break;
                            case 3:
                                extInfo += "24kHz";
                                break;
                            case 5:
                                extInfo += "32kHz";
                                break;
                            case 6:
                                extInfo += "44.1kHz";
                                break;
                            case 7:
                                extInfo += "48kHz";
                                break;
                            default:
                                break;
                        }
                        extInfo += "\r\n";
                    }
                }
                extInfo += "\r\n";

                //スクランブル
                if (!(0x7880 <= eventInfo.original_network_id && eventInfo.original_network_id <= 0x7FE8))
                {
                    if (eventInfo.FreeCAFlag == 0)
                    {
                        extInfo += "無料放送\r\n";
                    }
                    else
                    {
                        extInfo += "有料放送\r\n";
                    }
                    extInfo += "\r\n";
                }

                //イベントリレー
                if (eventInfo.EventRelayInfo != null)
                {
                    if (eventInfo.EventRelayInfo.eventDataList.Count > 0)
                    {
                        extInfo += "イベントリレーあり:\r\n";
                        foreach (EpgEventData info in eventInfo.EventRelayInfo.eventDataList)
                        {
                            key = ((UInt64)info.original_network_id) << 32 |
                                ((UInt64)info.transport_stream_id) << 16 |
                                ((UInt64)info.service_id);
                            if (ChSet5.Instance.ChList.ContainsKey(key) == true)
                            {
                                extInfo += ChSet5.Instance.ChList[key].ServiceName + "(" + ChSet5.Instance.ChList[key].NetworkName + ")" + " ";
                            }
                            else
                            {
                                extInfo += "OriginalNetworkID : " + info.original_network_id.ToString() + " (0x" + info.original_network_id.ToString("X4") + ") ";
                                extInfo += "TransportStreamID : " + info.transport_stream_id.ToString() + " (0x" + info.transport_stream_id.ToString("X4") + ") ";
                                extInfo += "ServiceID : " + info.service_id.ToString() + " (0x" + info.service_id.ToString("X4") + ") ";
                            }
                            extInfo += "EventID : " + info.event_id.ToString() + " (0x" + info.event_id.ToString("X4") + ")\r\n";
                            extInfo += "\r\n";
                        }
                        extInfo += "\r\n";
                    }
                }

                extInfo += "OriginalNetworkID : " + eventInfo.original_network_id.ToString() + " (0x" + eventInfo.original_network_id.ToString("X4") + ")\r\n";
                extInfo += "TransportStreamID : " + eventInfo.transport_stream_id.ToString() + " (0x" + eventInfo.transport_stream_id.ToString("X4") + ")\r\n";
                extInfo += "ServiceID : " + eventInfo.service_id.ToString() + " (0x" + eventInfo.service_id.ToString("X4") + ")\r\n";
                extInfo += "EventID : " + eventInfo.event_id.ToString() + " (0x" + eventInfo.event_id.ToString("X4") + ")\r\n";

            }

            if (textMode == EventInfoTextMode.All || textMode == EventInfoTextMode.BasicOnly)
            {
                retText = basicInfo;
            }
            if (textMode == EventInfoTextMode.All || textMode == EventInfoTextMode.ExtOnly)
            {
                retText += extInfo;
            }
            return retText;
        }
Esempio n. 4
0
        public String ConvertProgramText(EpgEventInfo eventInfo, EventInfoTextMode textMode)
        {
            string retText = "";
            string basicInfo = "";
            string extInfo = "";
            if (eventInfo != null)
            {
                UInt64 key = eventInfo.Create64Key();
                if (ChSet5.ChList.ContainsKey(key) == true)
                {
                    basicInfo += ChSet5.ChList[key].ServiceName + "(" + ChSet5.ChList[key].NetworkName + ")" + "\r\n";
                }

                basicInfo += ConvertTimeText(eventInfo) + "\r\n";

                if (eventInfo.ShortInfo != null)
                {
                    basicInfo += eventInfo.ShortInfo.event_name + "\r\n\r\n";
                    extInfo += eventInfo.ShortInfo.text_char + "\r\n\r\n";
                }

                if (eventInfo.ExtInfo != null)
                {
                    extInfo += eventInfo.ExtInfo.text_char + "\r\n\r\n";
                }

                //ジャンル
                extInfo += "ジャンル :\r\n";
                if (eventInfo.ContentInfo != null)
                {
                    foreach (EpgContentData info in eventInfo.ContentInfo.nibbleList)
                    {
                        UInt16 ID1 = (UInt16)(((UInt16)info.content_nibble_level_1) << 8 | 0xFF);
                        UInt16 ID2 = (UInt16)(((UInt16)info.content_nibble_level_1) << 8 | info.content_nibble_level_2);
                        if (ID2 == 0x0e01)//CS、仮対応データをそのまま使用。
                        {
                            ID1 = (UInt16)(((UInt16)info.user_nibble_1) << 8 | 0x70FF);
                            ID2 = (UInt16)(((UInt16)info.user_nibble_1) << 8 | 0x7000 | info.user_nibble_2);
                        }

                        String content = "";
                        ContentKindInfo kindInfo;
                        if (ContentKindDictionary.TryGetValue(ID1, out kindInfo) == true)
                        {
                            content += kindInfo.ContentName;
                        }
                        else
                        {
                            content += "不明" + "(0x" + info.content_nibble_level_1.ToString("X2") + info.content_nibble_level_2.ToString("X2") + ")";
                        }
                        if (ContentKindDictionary.TryGetValue(ID2, out kindInfo) == true)
                        {
                            content += " - " + kindInfo.SubName;
                        }
                        else
                        {
                            content += " - " + "不明" + "(0x" + info.user_nibble_1.ToString("X2") + info.user_nibble_2.ToString("X2") + ")";
                        }
                        extInfo += content + "\r\n";
                    }
                }
                extInfo += "\r\n";

                //映像
                extInfo += "映像 :";
                if (eventInfo.ComponentInfo != null)
                {
                    int streamContent = eventInfo.ComponentInfo.stream_content;
                    int componentType = eventInfo.ComponentInfo.component_type;
                    UInt16 componentKey = (UInt16)(streamContent << 8 | componentType);
                    if (ComponentKindDictionary.ContainsKey(componentKey) == true)
                    {
                        extInfo += ComponentKindDictionary[componentKey];
                    }
                    if (eventInfo.ComponentInfo.text_char.Length > 0)
                    {
                        extInfo += "\r\n";
                        extInfo += eventInfo.ComponentInfo.text_char;
                    }
                }
                extInfo += "\r\n";

                //音声
                extInfo += "音声 :\r\n";
                if (eventInfo.AudioInfo != null)
                {
                    foreach (EpgAudioComponentInfoData info in eventInfo.AudioInfo.componentList)
                    {
                        int streamContent = info.stream_content;
                        int componentType = info.component_type;
                        UInt16 componentKey = (UInt16)(streamContent << 8 | componentType);
                        if (ComponentKindDictionary.ContainsKey(componentKey) == true)
                        {
                            extInfo += ComponentKindDictionary[componentKey];
                        }
                        if (info.text_char.Length > 0)
                        {
                            extInfo += "\r\n";
                            extInfo += info.text_char;
                        }
                        extInfo += "\r\n";
                        extInfo += "サンプリングレート :";
                        switch (info.sampling_rate)
                        {
                            case 1:
                                extInfo += "16kHz";
                                break;
                            case 2:
                                extInfo += "22.05kHz";
                                break;
                            case 3:
                                extInfo += "24kHz";
                                break;
                            case 5:
                                extInfo += "32kHz";
                                break;
                            case 6:
                                extInfo += "44.1kHz";
                                break;
                            case 7:
                                extInfo += "48kHz";
                                break;
                            default:
                                break;
                        }
                        extInfo += "\r\n";
                    }
                }
                extInfo += "\r\n";

                //スクランブル
                if (!ChSet5.IsDttv(eventInfo.original_network_id))
                {
                    if (eventInfo.FreeCAFlag == 0)
                    {
                        extInfo += "無料放送\r\n";
                    }
                    else
                    {
                        extInfo += "有料放送\r\n";
                    }
                    extInfo += "\r\n";
                }

                //イベントリレー
                if (eventInfo.EventRelayInfo != null)
                {
                    if (eventInfo.EventRelayInfo.eventDataList.Count > 0)
                    {
                        extInfo += "イベントリレーあり:\r\n";
                        foreach (EpgEventData info in eventInfo.EventRelayInfo.eventDataList)
                        {
                            key = info.Create64Key();
                            if (ChSet5.ChList.ContainsKey(key) == true)
                            {
                                extInfo += ChSet5.ChList[key].ServiceName + "(" + ChSet5.ChList[key].NetworkName + ")" + " ";
                            }
                            else
                            {
                                extInfo += "OriginalNetworkID : " + info.original_network_id.ToString() + " (0x" + info.original_network_id.ToString("X4") + ") ";
                                extInfo += "TransportStreamID : " + info.transport_stream_id.ToString() + " (0x" + info.transport_stream_id.ToString("X4") + ") ";
                                extInfo += "ServiceID : " + info.service_id.ToString() + " (0x" + info.service_id.ToString("X4") + ") ";
                            }
                            extInfo += "EventID : " + info.event_id.ToString() + " (0x" + info.event_id.ToString("X4") + ")\r\n";
                            extInfo += "\r\n";
                        }
                        extInfo += "\r\n";
                    }
                }

                extInfo += "OriginalNetworkID : " + eventInfo.original_network_id.ToString() + " (0x" + eventInfo.original_network_id.ToString("X4") + ")\r\n";
                extInfo += "TransportStreamID : " + eventInfo.transport_stream_id.ToString() + " (0x" + eventInfo.transport_stream_id.ToString("X4") + ")\r\n";
                extInfo += "ServiceID : " + eventInfo.service_id.ToString() + " (0x" + eventInfo.service_id.ToString("X4") + ")\r\n";
                extInfo += "EventID : " + eventInfo.event_id.ToString() + " (0x" + eventInfo.event_id.ToString("X4") + ")\r\n";

            }

            if (textMode == EventInfoTextMode.All || textMode == EventInfoTextMode.BasicOnly)
            {
                retText = basicInfo;
            }
            if (textMode == EventInfoTextMode.All || textMode == EventInfoTextMode.ExtOnly)
            {
                retText += extInfo;
            }
            return retText;
        }