From 2562ee38c58a113113a2943ae057c1937ae533cb Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 02 七月 2020 13:49:20 +0800
Subject: [PATCH] 2020-07-01 1.去掉读电能操作,去掉kwh状态显示。 2.当前是分享住宅,不允许删除备份。 3.进入搜索网关页面,切换到本地模式。 4.Alexa页面 增加添加设备失败提示。 5.子账号页面,底部增加文字提示。6.Android 默认隐藏底部虚拟按键。

---
 Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs |   44 +++++++++++++++++++++++---------------------
 1 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs
index 6299a4e..75f8a7a 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs
@@ -26,7 +26,7 @@
 
         //public static Button LinkStatusTip = new Button () {
         //    Height = Application.GetRealHeight (36),
-        //    Width = Application.GetRealWidth (640),
+        //    Width = Application.GetRealWidth (Application.DesignWidth),
         //    BackgroundColor = SkinStyle.Current.LinkStatusTipColor
         //};
 
@@ -34,33 +34,33 @@
             IsShowPoint = false,
         };
         public static FrameLayout FavoriteBodyView = new FrameLayout () {
-            Width = Application.GetRealWidth (640),
-            Height = Application.GetRealHeight (1136)
+            //Width = Application.GetRealWidth (Application.DesignWidth),
+            //Height = Application.GetRealHeight (Application.DesignHeight)
         };
         public static UserRoom FavoriteRoom = new UserRoom () {
-            Width = Application.GetRealWidth (640),
-            Height = Application.GetRealHeight (1136 - 90)
+            //Width = Application.GetRealWidth (Application.DesignWidth),
+            Height = Application.GetRealHeight (Application.DesignHeight - userMenuItemHeight)
         };
 
         public static PageLayout DevicePageView = new PageLayout () {
             IsShowPoint = false,
         };
         public static FrameLayout DeviceBodyView = new FrameLayout () {
-            Width = Application.GetRealWidth (640),
-            Height = Application.GetRealHeight (1136)
+            //Width = Application.GetRealWidth (Application.DesignWidth),
+            Height = Application.GetRealHeight (Application.DesignHeight)
         };
         public static VerticalScrolViewLayout DeviceView = new VerticalScrolViewLayout () {
             Y = Application.GetRealHeight (126),
-            Width = Application.GetRealWidth (640),
-            Height = Application.GetRealHeight (1136 - 126 - 90),
+            //Width = Application.GetRealWidth (Application.DesignWidth),
+            Height = Application.GetRealHeight (Application.DesignHeight - 126 - userMenuItemHeight),
         };
 
         public static PageLayout RoomPageView = new PageLayout () {
             IsShowPoint = false,
         };
         public static FrameLayout RoomBodyView = new FrameLayout () {
-            Width = Application.GetRealWidth (640),
-            Height = Application.GetRealHeight (1136)
+            Width = Application.GetRealWidth (Application.DesignWidth),
+            Height = Application.GetRealHeight (Application.DesignHeight)
         };
 
         public static PageLayout SettingPageView = new PageLayout () {
@@ -68,18 +68,18 @@
         };
         public static FrameLayout SettingBodyView = new FrameLayout () {
             BackgroundColor = SkinStyle.Current.MainColor,
-            Height = Application.GetRealHeight (1136)
+            Height = Application.GetRealHeight (Application.DesignHeight)
         };
         public static VerticalScrolViewLayout SettingView = new VerticalScrolViewLayout () {
             Y = Application.GetRealHeight (126),
-            Width = Application.GetRealWidth (640),
-            Height = Application.GetRealHeight (1136 - 126 - 90 - 90),
+            Width = Application.GetRealWidth (Application.DesignWidth),
+            Height = Application.GetRealHeight (Application.DesignHeight - 126 - userMenuItemHeight - 90),
             BackgroundColor = SkinStyle.Current.ViewColor,
             //ScrollEnabled = true
         };
         public static Button btnVersion = new Button () {
-            Y = Application.GetRealHeight (1136 - 90 - 90),
-            Width = Application.GetRealWidth (640),
+            Y = Application.GetRealHeight (Application.DesignHeight - userMenuItemHeight - 90),
+            Width = Application.GetRealWidth (Application.DesignWidth),
             Height = Application.GetRealHeight (90),
             Text = Language.StringByID (R.MyInternationalizationString.Version) + " : " + MainPage.RequestVersion,
             TextColor = SkinStyle.Current.TextColor1,
@@ -88,8 +88,8 @@
         };
 
         public static FrameLayout UserMenuItem = new FrameLayout () {
-            Y = Application.GetRealHeight (Application.DesignHeight - 90),
-            Height = Application.GetRealHeight (95),
+            Y = Application.GetRealHeight (Application.DesignHeight - userMenuItemHeight),
+            Height = Application.GetRealHeight (userMenuItemHeight+5),
             BackgroundColor = SkinStyle.Current.MainColor
         };
 
@@ -269,9 +269,11 @@
                                     //2020-01-14 鐧诲綍鎴愬姛鍚庯紝鍒锋柊涓�娆″綋鍓嶄綇瀹呯綉鍏�
                                     GetNowHomeGatewayAfterLoginSuccess ();
                                 } else if (!string.IsNullOrEmpty (revertObj.StateCode)) {
-                                    MainPage.LoginUser.LastTime = DateTime.Now.AddDays (-30);
-                                    MainPage.LoginUser.SaveUserInfo ();
-                                    new AccountLogin ().Show ();
+                                    if (revertObj.StateCode != ErrorCode.NetworkError && revertObj.StateCode != "Data Exception") {
+                                        MainPage.LoginUser.LastTime = DateTime.Now.AddDays (-30);
+                                        MainPage.LoginUser.SaveUserInfo ();
+                                        new AccountLogin ().Show ();
+                                    }
                                 }
                             });
                         }

--
Gitblit v1.8.0