| | |
| | | // Pir.currPir = Pir.pirDeviceList[0]; |
| | | //} |
| | | //默认第一个红外宝 |
| | | Pir.currPir = Pir.pirDeviceList[0]; |
| | | int sum = 0; |
| | | for (int i = 0; i < Pir.pirDeviceList.Count; i++) |
| | | { |
| | |
| | | } |
| | | GetBrandList(jobDeviceType.id, (brandList) => |
| | | { |
| | | var brandSupportStrList = GetBrandSupport(if_value); |
| | | var strList = new List<string>(); |
| | | for (int str = 0; str < brandList.Count; str++) |
| | | { |
| | | string s = brandList[str].brandName; |
| | | var bool_if = brandSupportStrList.Find((c) => s.Contains(c)); |
| | | if (bool_if != null) |
| | | { |
| | | strList.Add(s); |
| | | } |
| | | |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | BrandList brandObj = new BrandList(); |
| | | MainPage.BasePageView.AddChidren(brandObj); |
| | | brandObj.Show(brandList, strList, strings[1]); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | brandObj.Show(brandList, strings[1]); |
| | | }); |
| | | |
| | | }); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取品牌支持 |
| | | /// </summary> |
| | | /// <param name="index">索引值</param> |
| | | private List<string> GetBrandSupport(int index) |
| | | { |
| | | List<string> strList = new List<string>(); |
| | | switch (index) |
| | | { |
| | | case 1: |
| | | { |
| | | strList.Add("格力"); |
| | | strList.Add("美的"); |
| | | strList.Add("海尔"); |
| | | strList.Add("松下"); |
| | | strList.Add("海信"); |
| | | strList.Add("长虹"); |
| | | } |
| | | break; |
| | | case 2: |
| | | { |
| | | strList.Add("创维"); |
| | | strList.Add("TCL"); |
| | | strList.Add("海信"); |
| | | strList.Add("长虹"); |
| | | strList.Add("海尔"); |
| | | strList.Add("三星"); |
| | | strList.Add("乐视"); |
| | | strList.Add("索尼"); |
| | | strList.Add("LG乐金"); |
| | | } |
| | | break; |
| | | case 3: |
| | | { |
| | | } |
| | | break; |
| | | case 4: |
| | | { |
| | | } |
| | | break; |
| | | case 5: |
| | | { |
| | | } |
| | | break; |
| | | case 6: |
| | | { |
| | | } |
| | | break; |
| | | |
| | | |
| | | } |
| | | return strList; |
| | | } |
| | | /// <summary> |
| | | /// 获取设备类型str |
| | | /// </summary> |