wxr
2021-02-26 981ccd4afab6271422d7f169b30a2efa55eafde1
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/BrandListView.cs
File was renamed from HDL_ON/UI/UI2/3-Intelligence/Automation/EmptyClass.cs
@@ -4,9 +4,9 @@
using System.Collections.Generic;
using System.Text;
namespace HDL_ON.UI.UI2.Intelligence.Automation
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class EmptyClass : FrameLayout
    public class BrandListView : FrameLayout
    {
        /// <summary>
        /// 
@@ -14,10 +14,8 @@
        /// <param name="list">表示该列表元素A-Z字母筛选显示出来</param>
        /// <param name="list6">表示该列表元素显示在list前面(该列表元素不做A-Z字母筛选),没有可以为list6=null</param>
        /// <param name="action">返回选中文本</param>
        public void Show(List<string> list, List<string> list6, Action<string> action)
        public void Show(List<string> list, List<string> list6, Action<string> action)
        {
            //string text = "30";
            //byte[] bytes = new byte[text.Length / 2];
            //for (int i = 0, j = 0; i < bytes.Length; j += 2, i++)
@@ -27,8 +25,6 @@
            //}
            ////把byte数组转换成文字
            //string str = System.Text.Encoding.UTF8.GetString(bytes);
            var frameLayout = new FrameLayout
            {
                BackgroundColor = CSS.CSS_Color.viewTop,
@@ -59,7 +55,14 @@
                UnSelectedImagePath = "LogicIcon/back.png",
            };
            frameLayout.AddChidren(backBtn);
            backBtn.MouseUpEventHandler += (sen, e) =>
            var clickBackBtn = new Button
            {
                Width = Application.GetRealWidth(12 + 16 + 20),
                Height = Application.GetRealWidth(20 + 20),
                Y = Application.GetRealHeight(32),
            };
            frameLayout.AddChidren(clickBackBtn);
            clickBackBtn.MouseUpEventHandler += (sen, e) =>
            {
                this.RemoveFromParent();
            };
@@ -86,16 +89,6 @@
            };
            this.AddChidren(fram);
            //var list11 = new List<string> {
            //   "爱你", "哎呦","埃及","哈弗换壳哈弗", "爱德华多v","俺几个疯了",
            //    "拜了", "巴士", "百夫",  "百合地理课你打算", "不度老骥伏枥", "比到九点",
            //    "车站","测试","此地", "才看见好得快","吃软饭","从看见二十多",
            //   "等待机会吧","的客户", "多喝点", "登记哦然后", "打电话",
            //     "恩肤霜看就看了", "饿死os","恶魔城","儿科联动", "恩六颗子弹拉拉裤洗澡了","发大学生发发",
            //    "真厉害i发多少", "知道你付款了发", "尬酒回复",  "改进的话", "天天速度回答", "太好了开车",
            //    "减肥的看过","桡出口处那","如果觉得", "很舒服的","吃软饭","从看见二十多",
            //   "龙卷风亏大发","去好看", "多喝点", "好浪费好", "打电话"};
            if (list == null)
            {
                list = new List<string>();
@@ -105,7 +98,6 @@
                list6 = new List<string>();
            }
            var list1 = GetDateList(list);
            list1.Add("1");
            list1.InsertRange(0, list6);
@@ -140,7 +132,7 @@
                Width = Application.GetRealWidth(10 + 6),
            };
            fram.AddChidren(a_zFra);
            var list2 = GetList();
            var list2 = GetList();
            for (int i = 0; i < list2.Count; i++)
            {
@@ -183,7 +175,7 @@
            }
            #endregion
            RefreshLayout(vv, list1,action);
            RefreshLayout(vv, list1, action);
@@ -195,7 +187,7 @@
        /// </summary>
        /// <param name="vv">父控件</param>
        /// <param name="list">显示列表</param>
        private void RefreshLayout(VerticalScrolViewLayout vv, List<string> list,Action<string> action)
        private void RefreshLayout(VerticalScrolViewLayout vv, List<string> list, Action<string> action)
        {
            vv.RemoveAll();
            foreach (var str in list)
@@ -236,8 +228,8 @@
                clickBtn.MouseUpEventHandler += (sen, e) =>
                {
                    //找到索引值
                    var index = list.IndexOf(clickBtn.Tag.ToString());
                    //var index = list.IndexOf();
                    action(clickBtn.Tag.ToString());
                    this.RemoveFromParent();
                };
@@ -261,7 +253,6 @@
                return false;
            }
        }
        /// <summary>
        /// 获取显示列表
        /// </summary>
@@ -300,7 +291,6 @@
            }
            return list;
        }
        /// <summary>
        /// 获取A-Z字母列表
        /// </summary>
@@ -321,7 +311,6 @@
            }
            return list;
        }
        /// <summary>
        /// 获取汉字首字母
        /// </summary>