| | |
| | | #region 区域变量 |
| | | int showdFunctionCount = 0; |
| | | string roomId; |
| | | string showedFunctionRoomId="0"; |
| | | string showedFunctionRoomId = "0"; |
| | | #endregion |
| | | |
| | | public RoomEditFunctionPage(string rId) |
| | |
| | | |
| | | btnChoosedRoom = new Button() |
| | | { |
| | | X = Application.GetRealWidth(313-100+24), |
| | | X = Application.GetRealWidth(313 - 100 + 24), |
| | | Width = Application.GetRealWidth(100), |
| | | //Height = Application.GetRealHeight(55), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | |
| | | |
| | | foreach (var function in DB_ResidenceData.residenceData.functionList.functions) |
| | | { |
| | | if (function.roomIdList.Count > 0 && !function.roomIdList.Contains(roomId)&& showUnallocated) |
| | | if (function.roomIdList.Count > 0 && !function.roomIdList.Contains(roomId) && showUnallocated) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | functionRow.AddChidren(btnFunctionIcon); |
| | | switch (function.functionCategory) |
| | | { |
| | | case FunctionType.AC: |
| | | case FunctionCategory.AC: |
| | | btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon.png"; |
| | | break; |
| | | case FunctionType.Curtain: |
| | | case FunctionCategory.Curtain: |
| | | btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png"; |
| | | break; |
| | | case FunctionType.Light: |
| | | case FunctionCategory.Light: |
| | | btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Light/LightThinIcon.png"; |
| | | break; |
| | | case FunctionType.FloorHeating: |
| | | case FunctionCategory.FloorHeating: |
| | | btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingThinIcon.png"; |
| | | break; |
| | | } |
| | |
| | | IsSelected = function.roomIdList.Contains(roomId) |
| | | }; |
| | | functionRow.AddChidren(btnChooseIcon); |
| | | LoadEvent_ChangeRoomFunctionList(functionRow,btnChooseIcon, function); |
| | | LoadEvent_ChangeRoomFunctionList(functionRow, btnChooseIcon, function); |
| | | |
| | | showdFunctionCount++; |
| | | } |
| | |
| | | Tag = "0" |
| | | }; |
| | | roomListView.AddChidren(btnAllRoom); |
| | | LoadEvent_ChangeShowedFunctionList(btnAllRoom,dialog,Language.StringByID(StringId.All)); |
| | | LoadEvent_ChangeShowedFunctionList(btnAllRoom, dialog, Language.StringByID(StringId.All)); |
| | | |
| | | roomListView.AddChidren(new Button() |
| | | { |
| | |
| | | Tag = tempRoom.sid, |
| | | }; |
| | | roomListView.AddChidren(btnRoom); |
| | | LoadEvent_ChangeShowedFunctionList(btnRoom,dialog,tempRoom.name); |
| | | LoadEvent_ChangeShowedFunctionList(btnRoom, dialog, tempRoom.name); |
| | | |
| | | roomListView.AddChidren(new Button() |
| | | { |
| | |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | } |
| | | dialogBodyView.MouseUpEventHandler = (sender, e) => { |
| | | dialogBodyView.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | |