| | |
| | | /// <summary> |
| | | /// 默认选中是房间时:全部区域 |
| | | /// </summary> |
| | | public static Entity.Room selectedRoom = new Entity.Room { roomId ="6688" }; |
| | | //public static Entity.Room selectedRoom = new Entity.Room { roomId ="6688" }; |
| | | |
| | | /// <summary> |
| | | /// 默认选中是设备类型时:全部功能 |
| | |
| | | funAllAreaView.btnText1.Text = (areaView.btnClick.Tag as Entity.Room).roomName; |
| | | ///切换房间默认功能类型全部; |
| | | funAllAreaView.btnText2.Text = Language.StringByID(StringId.allFun); |
| | | selectedRoom = (areaView.btnClick.Tag as Entity.Room); |
| | | //selectedRoom = (areaView.btnClick.Tag as Entity.Room); |
| | | UserInfo.Current.logicselectedRoom = (areaView.btnClick.Tag as Entity.Room); |
| | | UserInfo.Current.logicselectedFunction = ""; |
| | | ///获取显示设备列表 |
| | | var list = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room, if_type); |
| | | |
| | |
| | | { |
| | | |
| | | //获取最终显示列表 |
| | | var functionList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(selectedRoom, if_type); |
| | | var functionList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_type); |
| | | //获取设备列表的类型(例如:灯光类,窗帘类。。。) |
| | | var deviceTypeList = LogicMethod.CurrLogicMethod.GetDeviceTypeList(functionList); |
| | | if (deviceTypeList.Count == 0) |
| | |
| | | { |
| | | fLayout.RemoveFromParent(); |
| | | funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString(); |
| | | UserInfo.Current.logicselectedFunction = areaView.btnClick.Tag.ToString(); |
| | | ///获取单个类型(例如:灯光类。。)设备FunctionType列表 |
| | | var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(areaView.btnClick.Tag.ToString()); |
| | | var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction); |
| | | ///获取单个灯光类型(例如:灯光1,灯光2。。)显示设备列表 |
| | | var lists = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, functionList); |
| | | DeviceListView(vv, lists); |
| | | var lists2 = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, functionList); |
| | | DeviceListView(vv, lists2); |
| | | |
| | | }; |
| | | if (deviceTypeList.Count - 1 == i) |
| | | { |
| | |
| | | funAllAreaView.btnText2.MouseUpEventHandler += funClick; |
| | | funAllAreaView.btnIcon2.MouseUpEventHandler += funClick; |
| | | ///获取显示设备列表 |
| | | var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(selectedRoom, if_type); |
| | | DeviceListView(vv, deviceList); |
| | | 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); |
| | | } |
| | | funAllAreaView.btnText1.Text = UserInfo.Current.logicselectedRoom.roomName; |
| | | } |
| | | |
| | | |
| | |
| | | /// <param name="deviceList"></param> |
| | | public void DeviceListView(VerticalScrolViewLayout verticalScrolView, List<HDL_ON.Entity.Function> deviceList) |
| | | { |
| | | |
| | | verticalScrolView.RemoveAll(); |
| | | foreach (var dev in deviceList) |
| | | { |