| | |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(184), |
| | | Height = Application.GetRealWidth(192),//2020-12-01 房间图片比例改回16:9 |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | Tag = room.sid, |
| | | }; |
| | |
| | | var roomViewbg = new ImageView() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(184), |
| | | Height = Application.GetRealWidth(192),//2020-12-01 房间图片比例改回16:9 |
| | | ImagePath = room.backgroundImage, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | }; |
| | |
| | | var btnAllClose = new Button() |
| | | { |
| | | X = Application.GetRealWidth(282), |
| | | Y = Application.GetRealHeight(126), |
| | | Y = Application.GetRealWidth(126), |
| | | Width = Application.GetMinRealAverage(58), |
| | | Height = Application.GetMinRealAverage(58), |
| | | UnSelectedImagePath = "Classification/Room/AllCloseIcon.png", |
| | |
| | | |
| | | var btn = new Button() |
| | | { |
| | | Height = Application.GetRealHeight(20), |
| | | Height = Application.GetRealWidth(20), |
| | | }; |
| | | roomListView.AddChidren(btn); |
| | | |
| | | roomViewbgColor.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | Action<Room > ReloadRoomName = (obj) => { |
| | | btnFloorAndRoomName.Text = obj.floorName + obj.name; |
| | | Action ReloadRoomName = () => { |
| | | btnFloorAndRoomName.Text = room.floorName + room.name; |
| | | }; |
| | | |
| | | var view = new RoomPage(room, ReloadRoomName); |
| | | //房间删除事件 |
| | | Action deleteAction = () => { |
| | | roomView.RemoveFromParent(); |
| | | }; |
| | | |
| | | var view = new RoomPage(room, ReloadRoomName, deleteAction); |
| | | MainPage.BasePageView.AddChidren(view); |
| | | view.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | case ShowFunction.Light: |
| | | #region Light |
| | | functionCount = DB_ResidenceData.functionList.lights.Count; |
| | | functionOnCount = DB_ResidenceData.functionList.lights.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = DB_ResidenceData.functionList.lights.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | #endregion |
| | | break; |
| | | case ShowFunction.AC: |
| | | #region AC |
| | | functionCount = DB_ResidenceData.functionList.aCs.Count; |
| | | functionOnCount = DB_ResidenceData.functionList.aCs.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = DB_ResidenceData.functionList.aCs.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | #endregion |
| | | break; |
| | | case ShowFunction.Curtain: |
| | | #region Curtain |
| | | functionCount = DB_ResidenceData.functionList.curtains.Count; |
| | | functionOnCount = DB_ResidenceData.functionList.curtains.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = DB_ResidenceData.functionList.curtains.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | #endregion |
| | | break; |
| | | case ShowFunction.FloorHeating: |
| | | #region 地热 |
| | | functionCount = DB_ResidenceData.functionList.floorHeatings.Count; |
| | | functionOnCount = DB_ResidenceData.functionList.floorHeatings.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = DB_ResidenceData.functionList.floorHeatings.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | #endregion |
| | | break; |
| | | case ShowFunction.DoorLock: |
| | |
| | | case ShowFunction.Electric: |
| | | #region 电器 |
| | | functionCount = DB_ResidenceData.functionList.electricals.Count; |
| | | functionOnCount = DB_ResidenceData.functionList.electricals.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = DB_ResidenceData.functionList.electricals.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | #endregion |
| | | break; |
| | | case ShowFunction.EnergyMonitoring: |
| | |
| | | break; |
| | | case ShowFunction.Music: |
| | | functionCount = Music.A31MusicModel.A31MusicModelList.Count; |
| | | functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | break; |
| | | case ShowFunction.Panel: |
| | | break; |
| | |
| | | #region Light |
| | | btnName.TextID = StringId.Lights; |
| | | functionCount = DB_ResidenceData.functionList.lights.Count; |
| | | functionOnCount = DB_ResidenceData.functionList.lights.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = DB_ResidenceData.functionList.lights.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | Button btnLightPower = new Button() |
| | | { |
| | | X = Application.GetRealWidth(120), |
| | |
| | | #region AC |
| | | btnName.TextID = StringId.AC; |
| | | functionCount = DB_ResidenceData.functionList.aCs.Count; |
| | | functionOnCount = DB_ResidenceData.functionList.aCs.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = DB_ResidenceData.functionList.aCs.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | Button btnAcPower = new Button() |
| | | { |
| | | X = Application.GetRealWidth(120), |
| | |
| | | #region Curtain |
| | | btnName.TextID = StringId.Curtain; |
| | | functionCount = DB_ResidenceData.functionList.curtains.Count; |
| | | functionOnCount = DB_ResidenceData.functionList.curtains.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = DB_ResidenceData.functionList.curtains.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | Button btnClose; |
| | | btnClose = new Button() |
| | | { |
| | |
| | | #region 地热 |
| | | btnName.TextID = StringId.FloorHeating; |
| | | functionCount = DB_ResidenceData.functionList.floorHeatings.Count; |
| | | functionOnCount = DB_ResidenceData.functionList.floorHeatings.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = DB_ResidenceData.functionList.floorHeatings.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | Button btnFhPower = new Button() |
| | | { |
| | | X = Application.GetRealWidth(120), |
| | |
| | | #region 电器 |
| | | btnName.TextID = StringId.Electric; |
| | | functionCount = DB_ResidenceData.functionList.electricals.Count; |
| | | functionOnCount = DB_ResidenceData.functionList.electricals.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = DB_ResidenceData.functionList.electricals.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | Button btnElectricPower = new Button() |
| | | { |
| | | X = Application.GetRealWidth(120), |
| | |
| | | case ShowFunction.Music: |
| | | btnName.TextID = StringId.Music; |
| | | functionCount = Music.A31MusicModel.A31MusicModelList.Count; |
| | | functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.value.ToString() == "on").Count; |
| | | functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var musicMain = new Music.MusicMain(); |