| | |
| | | /// <summary> |
| | | /// 默认选中是房间时:全部区域 |
| | | /// </summary> |
| | | private Entity.Room selectedRoom = new Entity.Room { sid = Language.StringByID(StringId.allAreas) }; |
| | | |
| | | public void Show() |
| | | private Entity.Room selectedRoom = new Entity.Room { uid = Language.StringByID(StringId.allAreas) }; |
| | | /// <summary> |
| | | /// 表示是(条件/目标) |
| | | /// </summary> |
| | | private string if_type; |
| | | public void Show(string str) |
| | | { |
| | | |
| | | if_type = str; |
| | | this.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | | LogicView.TopView topView = new LogicView.TopView(); |
| | | this.AddChidren(topView.FLayoutView()); |
| | |
| | | areaView.frameLayout.Y = Application.GetRealHeight(i * 44); |
| | | areaBgh.AddChidren(areaView.FLayoutView()); |
| | | } |
| | | areaView.btnRoomName.Text = room.name; |
| | | areaView.btnRoomName.Text = room.roomName; |
| | | areaView.btnClick.Tag = room; |
| | | areaView.btnClick.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | fLayout.RemoveFromParent(); |
| | | funAllAreaView.btnText1.Text = (areaView.btnClick.Tag as Entity.Room).name; |
| | | funAllAreaView.btnText1.Text = (areaView.btnClick.Tag as Entity.Room).roomName; |
| | | ///切换房间默认功能类型全部; |
| | | 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); |
| | | var list = LogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room,if_type); |
| | | |
| | | DeviceListView(vv, list); |
| | | }; |
| | |
| | | }; |
| | | |
| | | //获取最终显示列表 |
| | | var functionList = LogicMethod.GetFunctionDeviceList(selectedRoom, LogicMethod.condition_if); |
| | | var functionList = LogicMethod.GetFunctionDeviceList(selectedRoom, if_type); |
| | | //获取设备列表的类型(例如:灯光类,窗帘类。。。) |
| | | var deviceTypeList = LogicMethod.GetDeviceTypeList(functionList); |
| | | |
| | |
| | | funAllAreaView.btnText2.MouseUpEventHandler += funClick; |
| | | funAllAreaView.btnIcon2.MouseUpEventHandler += funClick; |
| | | ///获取显示设备列表 |
| | | var deviceList = LogicMethod.GetFunctionDeviceList(selectedRoom, LogicMethod.condition_if); |
| | | var deviceList = LogicMethod.GetFunctionDeviceList(selectedRoom, if_type); |
| | | DeviceListView(vv, deviceList); |
| | | |
| | | } |
| | |
| | | funView.btnClick.MouseUpEventHandler += (sen,e) => { |
| | | DeviceFunList deviceFunList = new DeviceFunList(); |
| | | MainPage.BasePageView.AddChidren(deviceFunList); |
| | | deviceFunList.Show(dev,0,false); |
| | | deviceFunList.Show(dev,0,false,if_type); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |