From 07466c19110693e3e439a7d7c8ad0bc21d9b3287 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期三, 29 四月 2020 09:14:01 +0800
Subject: [PATCH] 优化代码,更改门锁需求接口

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs |   69 +++++++++++++++++++---------------
 1 files changed, 39 insertions(+), 30 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
old mode 100644
new mode 100755
index ea3f30e..bf36e95
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
@@ -87,12 +87,20 @@
 
             //鍒濆鍖栨甯�
             this.tableContr = new InformationEditorControl();
-            this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1128);
-
-            //鍒濆鍖栬澶囧洖璺浘鏍�
-            this.InitDeviceEpointIcon(listBackControl);
-
-            //淇濆瓨
+
+            if (this.deviceObj.Type == DeviceType.FreshAir)
+            {
+                this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1028);
+            }
+            else
+            {
+                this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1128);
+            }
+
+            //鍒濆鍖栬澶囧洖璺浘鏍�
+            this.InitDeviceEpointIcon(listBackControl);
+
+            //淇濆瓨
             var btnFinish = new BottomClickButton();
             btnFinish.TextID = R.MyInternationalizationString.uSave;
             bodyFrameLayout.AddChidren(btnFinish);
@@ -316,8 +324,8 @@
                 {
                     strType = Language.StringByID(R.MyInternationalizationString.uSocket1);
                     nowSelectNo = 2;
-                }
-
+                }
+
                 var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2);
                 btnFunction.UseClickStatu = false;
                 listview.AddChidren(btnFunction);
@@ -379,18 +387,18 @@
             }
 
             //濡傛灉鏄柊椋�
-            if (nowSelectDevice.Type == DeviceType.FreshAir)
-            {
-                //鍔熻兘绫诲瀷
-                string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType);
+            if (nowSelectDevice.Type == DeviceType.FreshAir)
+            {
+                //鍔熻兘绫诲瀷
+                string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType);
                 string strType = Language.StringByID(R.MyInternationalizationString.FreshAir);
                 var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2);
                 btnFunction.UseClickStatu = false;
                 listview.AddChidren(btnFunction);
                 btnFunction.InitControl();
                 //搴曠嚎
-                btnFunction.AddBottomLine();
-            }
+                btnFunction.AddBottomLine();
+            }
         }
 
         #endregion
@@ -428,7 +436,7 @@
             else
             {
                 //涓嶉渶瑕佹粦鍔ㄦ帶浠�
-                frameBorder.AddChidren(frameBack);
+                frameBorder.AddChidren(frameBack);
             }
 
             int index = 0;
@@ -443,16 +451,19 @@
 
                 if (listIcon.Count == 1)
                 {
-                    frame.Gravity = Gravity.CenterVertical;
-
-                    //濡傛灉鏄柊椋�
-                    if (deviceObj.Type == DeviceType.FreshAir)
-                    {
-                        frame.RemoveFromParent();
-                        frameBack.BackgroundImagePath = "FreshAir/FreshAirRealDevicePic.png";
-                        frameBack.Width = Application.GetMinRealAverage(878);
-                        frameBack.Height = Application.GetMinRealAverage(354);
-                        frameBack.Gravity = Gravity.Center;
+                    frame.Gravity = Gravity.CenterVertical;
+
+                    //濡傛灉鏄柊椋�
+                    if (deviceObj.Type == DeviceType.FreshAir)
+                    {
+                        frame.RemoveFromParent();
+                        frameBorder.Y = Application.GetRealHeight(0);
+                        frameBorder.Height = Application.GetRealHeight(709);
+                        frameBack.BackgroundImagePath = "FreshAir/FreshAirRealDevicePic.png";
+                        frameBack.Width = this.GetPictrueRealSize(878);
+                        frameBack.Height = this.GetPictrueRealSize(354);
+                        frameBack.Y = Application.GetRealHeight(153);
+                        frameBack.Gravity = Gravity.Center;
                     }
                 }
                 else
@@ -466,15 +477,15 @@
                 //璁$畻鐪熷疄楂樺害
                 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)
                 {
                     //鍙樻洿楂樺害
                     frameBack.Height = realHeight;
                 }
             }
-        }
-
+        }
+
         /// <summary>
         /// 鍒濆鍖栦竴琛岃澶囧浘鏍�
         /// </summary>
@@ -515,8 +526,6 @@
                 //鍒濆鍖栬彍鍗曡
                 this.DeviceEpointSelectEvent(btnTemp, null);
             }
-
-
         }
 
         /// <summary>

--
Gitblit v1.8.0