wjc
2022-04-08 4cc40d883a00869f9aeec20e120d09c14ab427fb
2022年04月08日13:03:36

更新
1个文件已修改
28 ■■■■■ 已修改文件
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -122,7 +122,7 @@
                        ///获取显示设备列表
                        var list = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room, if_type);
                        DeviceListView(vv, list);
                        this.LoadingDeviceListView(vv, list);
                    };
                    if (roomList.Count - 1 == i)
                    {
@@ -220,11 +220,11 @@
                        fLayout.RemoveFromParent();
                        funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString();
                        UserInfo.Current.logicselectedFunction = areaView.btnClick.Tag.ToString();
                        ///获取单个类型(例如:灯光类。。)设备FunctionType列表<简称:spk列表>
                        ///获取设备单个大类spk列表(例如:灯光类,空调类...)
                        var typeFunctionList2 = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
                        ///获取单个灯光类型(例如:灯光1,灯光2。。)设备列表
                        ///获取设备单个小类列表(例如:灯光1,灯光2...)
                        var lists2 = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList2, functionList);
                        DeviceListView(vv, lists2);
                       this.LoadingDeviceListView(vv, lists2);
                    };
                    if (deviceTypeList.Count - 1 == i)
@@ -238,15 +238,15 @@
            funAllAreaView.btnIcon2.MouseUpEventHandler += funClick;
            ///获取房间支持的设备列表
            var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_type);
            ///获取单个类型(例如:灯光类。。)设备FunctionType列表<简称:spk列表>
            ///获取设备单个大类spk列表(例如:灯光类,空调类...)
            var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
            ///获取单个灯光类型(例如:灯光1,灯光2。。)设备列表
            ///获取设备单个小类列表(例如:灯光1,灯光2...)
            var lists = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, deviceList);
            ///房间名称
            funAllAreaView.btnText1.Text = UserInfo.Current.logicselectedRoom.roomName;
            ///功能类型名称<灯光类。。。。。>
            ///设备大类名称<灯光类。。。。。>
            funAllAreaView.btnText2.Text = UserInfo.Current.logicselectedFunction;
            DeviceListView(vv, lists);
            this.LoadingDeviceListView(vv, lists);
        }
@@ -255,9 +255,12 @@
        /// </summary>
        /// <param name="verticalScrolView">上下滑动</param>
        /// <param name="deviceList"></param>
        public void DeviceListView(VerticalScrolViewLayout verticalScrolView, List<HDL_ON.Entity.Function> deviceList)
        private void LoadingDeviceListView(VerticalScrolViewLayout verticalScrolView, List<HDL_ON.Entity.Function> deviceList)
        {
            System.Threading.Tasks.Task.Run(() =>
            {
                Application.RunOnMainThread(() =>
                {
            verticalScrolView.RemoveAll();
            foreach (var dev in deviceList)
            {
@@ -271,7 +274,8 @@
                funView.btnIcon.UnSelectedImagePath = LogicMethod.CurrLogicMethod.GetIconPath(dev.spk);
                funView.btnDeviceName.Text = dev.name;
                funView.btnRoomName.Text = dev.GetRoomListName();
                funView.btnClick.MouseUpEventHandler += (sen, e) => {
                        funView.btnClick.MouseUpEventHandler += (sen, e) =>
                        {
                    if (if_type == LogicMethod.condition_if)
                    {
                        ConditionDeviceFunList conditionDeviceFunList = new ConditionDeviceFunList();
@@ -289,6 +293,8 @@
                };
            }
                });
            });
        }
    }