From cf0bffdf072bae11bdb8c780d0a355818700f713 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期一, 18 五月 2020 15:42:45 +0800 Subject: [PATCH] 请合并代码,优化面板问题 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs old mode 100755 new mode 100644 index 6b79eb0..fc78718 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs @@ -84,7 +84,7 @@ //鍒濆鍖栨甯� this.tableContr = new InformationEditorControl(); - if (this.deviceObj.Type == DeviceType.FreshAir) + if (this.deviceObj.Type == DeviceType.FreshAir || this.deviceObj.Type == DeviceType.PMSensor) { this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1028); } @@ -329,6 +329,32 @@ frameBack.Height = this.GetPictrueRealSize(354); frameBack.Y = Application.GetRealHeight(153); frameBack.Gravity = Gravity.Center; + } + + //濡傛灉鏄疨M2.5 + if (deviceObj.Type == DeviceType.PMSensor) + { + frame.RemoveFromParent(); + frameBorder.Y = Application.GetRealHeight(0); + frameBorder.Height = Application.GetRealHeight(708); + frameBack.BackgroundImagePath = "RealDevice/SensorPMTwoPointFive.png"; + frameBack.Width = this.GetPictrueRealSize(418); + frameBack.Height = this.GetPictrueRealSize(403); + frameBack.Y = Application.GetRealHeight(153); + frameBack.Gravity = Gravity.Center; + } + + //濡傛灉鏄疨M2.5 + if (deviceObj.Type == DeviceType.PMSensor) + { + frame.RemoveFromParent(); + frameBorder.Y = Application.GetRealHeight(0); + frameBorder.Height = Application.GetRealHeight(708); + frameBack.BackgroundImagePath = "RealDevice/SensorPMTwoPointFive.png"; + frameBack.Width = this.GetPictrueRealSize(418); + frameBack.Height = this.GetPictrueRealSize(403); + frameBack.Y = Application.GetRealHeight(153); + frameBack.Gravity = Gravity.Center; } } else @@ -342,7 +368,7 @@ //璁$畻鐪熷疄楂樺害 int realHeight = this.GetPictrueRealSize(58 + 58);//涓婁笅闂磋窛 realHeight += frameBack.ChildrenCount * this.GetPictrueRealSize(124);//鍦嗗湀楂樺害 - realHeight += (frameBack.ChildrenCount-1) * this.GetPictrueRealSize(60);//鍦嗗湀闂磋窛 + realHeight += (frameBack.ChildrenCount - 1) * this.GetPictrueRealSize(60);//鍦嗗湀闂磋窛 if (realHeight > frameBack.Height) { //鍙樻洿楂樺害 -- Gitblit v1.8.0