| | |
| | | /// |
| | | /// </summary> |
| | | /// <param name="list">表示该列表元素A-Z字母筛选显示出来</param> |
| | | /// <param name="list6">表示该列表元素显示在list前面(该列表元素不做A-Z字母筛选),没有可以为list6=null</param> |
| | | public void Show(List<Brand>brandList,List<string> list, List<string> list6) |
| | | public void Show(List<Brand>brandList,List<string> list,string spk) |
| | | { |
| | | |
| | | var frameLayout = new FrameLayout |
| | |
| | | { |
| | | list = new List<string>(); |
| | | } |
| | | if (list6 == null) |
| | | { |
| | | list6 = new List<string>(); |
| | | } |
| | | var list1 = GetDateList(list); |
| | | list1.InsertRange(0, list6); |
| | | |
| | | var vv = new VerticalScrolViewLayout(); |
| | | fram.AddChidren(vv); |
| | |
| | | listStr.Add(s); |
| | | } |
| | | } |
| | | RefreshLayout(vv, brandList, listStr); |
| | | RefreshLayout(vv, brandList, listStr,spk); |
| | | |
| | | }; |
| | | #region A-Z |
| | |
| | | } |
| | | #endregion |
| | | |
| | | RefreshLayout(vv, brandList, list1); |
| | | RefreshLayout(vv, brandList, list1,spk); |
| | | |
| | | } |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="vv">父控件</param> |
| | | /// <param name="list">显示列表</param> |
| | | private void RefreshLayout(VerticalScrolViewLayout vv, List<Brand> brandList, List<string> list) |
| | | private void RefreshLayout(VerticalScrolViewLayout vv, List<Brand> brandList, List<string> list,string spk) |
| | | { |
| | | vv.RemoveAll(); |
| | | foreach (var str in list) |
| | |
| | | { |
| | | Matching matching = new Matching(); |
| | | MainPage.BasePageView.AddChidren(matching); |
| | | matching.Show(); |
| | | matching.Show(libraryList, spk); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }); |
| | | |
| | |
| | | var library = Newtonsoft.Json.JsonConvert.DeserializeObject<Library>(str); |
| | | if (library != null) |
| | | { |
| | | if (null == libraryList.Find((c) => c.brandId == library.brandId)) |
| | | if (libraryList.Count<20) |
| | | { |
| | | libraryList.Add(library); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public class Library |
| | | { |
| | | /// <summary> |
| | | /// 红外码 |
| | | /// </summary> |
| | | public string irCode = string.Empty; |
| | | /// <summary> |
| | | /// 品牌主键Id |
| | | /// </summary> |
| | | public string brandId = string.Empty; |
| | | /// <summary> |
| | | /// 红外码索引序号 |
| | | /// </summary> |
| | | public string irIndex = string.Empty; |
| | | |
| | | } |
| | | |
| | | } |
| | | |