/// <summary>現在の取得データに合わせてデフォルト表示の番組情報を展開する</summary> public List <UInt64> ExpandSpecialKey(List <UInt64> keyList, IEnumerable <EpgServiceInfo> additionalInfo = null) { if (keyList.All(key => !EpgServiceInfo.IsSPKey(key))) { return(keyList); } var list1 = Settings.Instance.ShowEpgCapServiceOnly ? ChSet5.ChListSelected : (ServiceEventList.Any() ? ServiceEventList.Values.Select(info => info.serviceInfo) : ChSet5.ChList.Values) .Concat(additionalInfo ?? Enumerable.Empty <EpgServiceInfo>()); List <EpgServiceInfo> infoList = ChSet5.GetSortedChList(list1.Distinct(), true, true).ToList(); var exDic = new Dictionary <UInt64, UInt64[]>(); exDic.Add((UInt64)EpgServiceInfo.SpecialViewServices.ViewServiceDttv, infoList.Where(info => info.IsDttv).Select(info => info.Key).ToArray()); exDic.Add((UInt64)EpgServiceInfo.SpecialViewServices.ViewServiceBS, infoList.Where(info => info.IsBS).Select(info => info.Key).ToArray()); exDic.Add((UInt64)EpgServiceInfo.SpecialViewServices.ViewServiceCS, infoList.Where(info => info.IsCS).Select(info => info.Key).ToArray()); exDic.Add((UInt64)EpgServiceInfo.SpecialViewServices.ViewServiceCS3, infoList.Where(info => info.IsSPHD).Select(info => info.Key).ToArray()); exDic.Add((UInt64)EpgServiceInfo.SpecialViewServices.ViewServiceOther, infoList.Where(info => info.IsOther).Select(info => info.Key).ToArray()); var exList = new List <UInt64>(); foreach (UInt64 key in keyList) { if (exDic.ContainsKey(key))//一応チェック { exList.AddRange(exDic[key]); } else { exList.Add(key); } } return(exList.Distinct().ToList()); }