Exemplo n.º 1
0
 public serviceFormat(string net, string service, string name, string uri)
 {
     this.networkId   = new epgNetowrkId(Convert.ToInt32(net, 16));
     this.serviceId   = new epgServiceId(Convert.ToInt32(service));
     this.serviceName = name;
     this.paramList   = new List <string>();
 }
Exemplo n.º 2
0
        public outputFormatBasic(int net, serviceFormat service, ExchangeLetter ex)
        {
            this.service   = service;
            this.networkid = new epgNetowrkId(net);
            this.serviceid = new epgServiceId(service.serviceId.value);
            this.eventid   = new epgEventId(1);
            this.eventtime = new epgEventTime();
            this.duration  = new epgDuration(0);
            this.title     = new epgTitle("", ex);
            this.contents  = new epgDescribe("", ex);
            this.payment   = new epgPayment(0);

            this.exchangeLetter = ex;
        }
Exemplo n.º 3
0
        public serviceFormat(string[] param)
        {
            if (param.Count() < 4)
            {
                return;
            }
            this.paramList   = new List <string>(param);
            this.networkId   = new epgNetowrkId(Convert.ToInt32(paramList[0].Trim(), 16));
            this.serviceId   = new epgServiceId(Convert.ToInt32(paramList[1].Trim()));
            this.serviceName = paramList[2].Trim();

            switch (paramList[3].Trim().ToLower())
            {
            case "interbee":
                this.type = MyType.INTERBEE;
                this.uri  = paramList[4].Trim(); // Table 1 か 2 か
                break;

            case "maxdata":
                this.type = MyType.MAXDATA;
                this.uri  = paramList[4].Trim();
                break;

            case "allkanji":
                this.type = MyType.ALLKANJI;
                break;

            case "madara":
                if (param.Count() < 9)
                {
                    return;
                }
                this.type            = MyType.MADARA;
                this.madaraGroupName = param[4].Trim();
                Int32.TryParse(paramList[5].Trim(), out this.madaraType);
                Int32.TryParse(paramList[6].Trim(), out this.madaraMethod);
                Int32.TryParse(paramList[7].Trim(), out this.madaraToChNum);
                this.madaraResolution = paramList[8].Trim();
                if (param.Count() > 9)
                {
                    this.madaraSource = paramList[9].Trim();
                    this.uri          = paramList[9].Trim();
                }
                if (paramList.Count() > 10)
                {
                    string[]     durations   = paramList[10].Trim().Split('/');
                    List <Int32> durationAry = new List <int>();
                    foreach (string duration in durations)
                    {
                        Int32 du = 30;
                        Int32.TryParse(duration, out du);
                        durationAry.Add(du);
                    }
                    this.madaraDurations = durationAry.ToArray();
                }

                break;

            default:
                this.type = MyType.URI;
                this.uri  = paramList[3].Trim();
                this.useExchangeLetter = true;
                break;
            }
            if (paramList.Count() > 3) // 他のパラメータを取得する。
            {
                if (string.IsNullOrEmpty(paramList.Find(x => x == "jlab035")))
                {
                    this.forceJlab035 = false;
                }
                if (string.IsNullOrEmpty(paramList.Find(x => x == "mostsimple")))
                {
                    this.mostSimple = false;
                }

                if (string.IsNullOrEmpty(paramList.Find(x => x == "035-264")))
                {
                    this.forceJlab035_videokind = 265;
                }
                else
                {
                    this.forceJlab035_videokind = 264;
                }
                // ARIB 外字強制変換を使わない?
                if (string.IsNullOrEmpty(paramList.Find(x => x == "noExtChar")))
                {
                    this.useExchangeLetter = false;
                }
                // VideoComponentType 値 初期値変更
                List <string> videoList = paramList.FindAll(x => x.StartsWith("videotype=0x"));
                if (videoList.Count() > 0)
                {
                    foreach (string v in videoList)
                    {
                        int    typeValue = 0xb3;
                        string value     = v.Trim().Substring("videotype=0x".Length);
                        int.TryParse(value, NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture, out typeValue);
                        this.DefaultVideoComponentType.value = typeValue;
                    }
                }
            }
        }