wxr
2022-03-11 4a9844ac95e2ff67b2a2b1082c30f15c561866c6
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -12,15 +12,6 @@
            if_type = str;
        }
        /// <summary>
        /// 默认选中是房间时:全部区域
        /// </summary>
        //public static Entity.Room selectedRoom = new Entity.Room { roomId ="6688" };
        /// <summary>
        /// 默认选中是设备类型时:全部功能
        /// </summary>
        //public static Entity.Room selectedRoom = new Entity.Room { roomId = "6688" };
        /// <summary>
        /// 表示是(条件/目标)
        /// </summary>
        private string if_type;
@@ -43,7 +34,9 @@
            viewLayout.AddChidren(vv);
            if (!MainView.IsGatewayType)
            {
                //如果是bus网关重置高度;
                funAllAreaView.frameLayout.Y = Application.GetRealHeight(0);
                vv.Y = funAllAreaView.frameLayout.Bottom;
            }
            //房间点击事件
            EventHandler<MouseEventArgs> roomClick = (sender, e) =>
@@ -124,7 +117,8 @@
                        funAllAreaView.btnText2.Text = Language.StringByID(StringId.allFun);
                        //selectedRoom = (areaView.btnClick.Tag as Entity.Room);
                        UserInfo.Current.logicselectedRoom = (areaView.btnClick.Tag as Entity.Room);
                        UserInfo.Current.logicselectedFunction = "";
                        ///切换房间默认:全部功能
                        UserInfo.Current.logicselectedFunction = Language.StringByID(StringId.allFun);
                        ///获取显示设备列表
                        var list = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room, if_type);
@@ -139,7 +133,7 @@
            };
            funAllAreaView.btnText1.MouseUpEventHandler += roomClick;
            funAllAreaView.btnIcon1.MouseUpEventHandler += roomClick;
            //功能点击事件
            //功能类型点击事件
            EventHandler<MouseEventArgs> funClick = (sender3, e3) =>
            {
@@ -226,9 +220,9 @@
                        fLayout.RemoveFromParent();
                        funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString();
                        UserInfo.Current.logicselectedFunction = areaView.btnClick.Tag.ToString();
                        ///获取单个类型(例如:灯光类。。)设备FunctionType列表
                        ///获取单个类型(例如:灯光类。。)设备FunctionType列表<简称:spk列表>
                        var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
                        ///获取单个灯光类型(例如:灯光1,灯光2。。)显示设备列表
                        ///获取单个灯光类型(例如:灯光1,灯光2。。)设备列表
                        var lists2 = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, functionList);
                        DeviceListView(vv, lists2);
@@ -242,25 +236,17 @@
            };
            funAllAreaView.btnText2.MouseUpEventHandler += funClick;
            funAllAreaView.btnIcon2.MouseUpEventHandler += funClick;
            ///获取显示设备列表
            ///获取房间支持的设备列表
            var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_type);
            if (!string.IsNullOrEmpty(UserInfo.Current.logicselectedFunction))
            {
                ///获取单个类型(例如:灯光类。。)设备FunctionType列表
                var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
                ///获取单个灯光类型(例如:灯光1,灯光2。。)显示设备列表
                var lists = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, deviceList);
                funAllAreaView.btnText2.Text = UserInfo.Current.logicselectedFunction;
                DeviceListView(vv, lists);
            }
            else
            {
                DeviceListView(vv, deviceList);
            }
            ///获取单个类型(例如:灯光类。。)设备FunctionType列表<简称:spk列表>
            var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
            ///获取单个灯光类型(例如:灯光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);
        }