陈嘉乐
2021-03-02 08a8afe782cd499550f94f3da0ba5788e1e12971
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs
@@ -16,8 +16,7 @@
        /// 
        /// </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
@@ -89,12 +88,7 @@
            {
                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);
@@ -111,7 +105,7 @@
                        listStr.Add(s);
                    }
                }
                RefreshLayout(vv, brandList, listStr);
                RefreshLayout(vv, brandList, listStr,spk);
            };
            #region A-Z
@@ -168,7 +162,7 @@
            }
            #endregion
            RefreshLayout(vv, brandList, list1);
            RefreshLayout(vv, brandList, list1,spk);
        }
        /// <summary>
@@ -176,7 +170,7 @@
        /// </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)
@@ -225,7 +219,7 @@
                     {
                         Matching matching = new Matching();
                         MainPage.BasePageView.AddChidren(matching);
                         matching.Show();
                         matching.Show(libraryList, spk);
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                     });
                 
@@ -256,7 +250,7 @@
                        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);
                            }
@@ -470,21 +464,6 @@
        }
    }
    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;
    }
}