陈嘉乐
2020-11-25 1761bbd82d7c1251283e3baa9b519204e456b2f8
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -14,7 +14,7 @@
        /// <summary>
        /// 默认选中是房间时:全部区域
        /// </summary>
        private Entity.Room selectedRoom = new Entity.Room { name = Language.StringByID(StringId.allAreas) };
        private Entity.Room selectedRoom = new Entity.Room { sid = Language.StringByID(StringId.allAreas) };
        public void Show()
        {
@@ -76,7 +76,7 @@
                    Width = Application.GetRealWidth(144),
                    Height = Application.GetRealHeight(44 * 5),
                };
                var roomList = LogicMethod.GetGatewayRoomListG(Language.StringByID(StringId.allAreas));
                var roomList = LogicMethod.GetGatewayRoomList(Language.StringByID(StringId.allAreas));
                if (roomList.Count > 5)
                {
                    bghFrameLyout.Height = Application.GetRealHeight(21 + 44 * 5);
@@ -111,9 +111,12 @@
                    {
                        fLayout.RemoveFromParent();
                        funAllAreaView.btnText1.Text = (areaView.btnClick.Tag as Entity.Room).name;
                        ///切换房间默认功能类型全部;
                        funAllAreaView.btnText2.Text = Language.StringByID(StringId.allFun);
                        selectedRoom = (areaView.btnClick.Tag as Entity.Room);
                        ///获取显示设备列表
                        var list = LogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room,LogicMethod.condition_if);
                        DeviceListView(vv, list);
                    };
@@ -159,7 +162,9 @@
                    Height = Application.GetRealHeight(44 * 5),
                };
                //获取最终显示列表
                var functionList = LogicMethod.GetFunctionDeviceList(selectedRoom, LogicMethod.condition_if);
                //获取设备列表的类型(例如:灯光类,窗帘类。。。)
                var deviceTypeList = LogicMethod.GetDeviceTypeList(functionList);
@@ -195,8 +200,10 @@
                    areaView.btnClick.MouseUpEventHandler += (sender, e2) =>
                    {
                        fLayout.RemoveFromParent();
                        funAllAreaView.btnText1.Text = areaView.btnClick.Tag.ToString();
                        funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString();
                        ///获取单个类型(例如:灯光类。。)设备FunctionType列表
                        var typeFunctionList = LogicMethod.GetDeviceTypeFunctionList(areaView.btnClick.Tag.ToString());
                        ///获取单个类型(例如:灯光类。。)显示设备列表
                        var lists = LogicMethod.GetShowDeviceList(typeFunctionList, functionList);
                        DeviceListView(vv, lists);
                    };
@@ -205,7 +212,7 @@
            };
            funAllAreaView.btnText2.MouseUpEventHandler += funClick;
            funAllAreaView.btnIcon2.MouseUpEventHandler += funClick;
            ///获取显示设备列表
            var deviceList = LogicMethod.GetFunctionDeviceList(selectedRoom, LogicMethod.condition_if);
            DeviceListView(vv, deviceList);
@@ -230,8 +237,12 @@
                funView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(dev.functionType);
                funView.btnDeviceName.Text = dev.name;
                funView.btnRoomName.Text = dev.GetRoomListName();
                funView.btnClick.MouseUpEventHandler += (sen,e) => {
                    DeviceFunList deviceFunList = new DeviceFunList();
                    MainPage.BasePageView.AddChidren(deviceFunList);
                    deviceFunList.Show(dev);
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                };
            }
        }
    }