From 8edf8fd9f5f7c29cc6302a8d46de06d391ed3657 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 16 一月 2020 13:03:57 +0800
Subject: [PATCH] 2020-01-16 Version 2.50115-B3 1.优化MQTT连接。 2.增加本地通信加密。 3.增加配置网关提示语。 4.编辑定时器增加重复名字提示 5.更新规范翻译。

---
 Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs |   44 +++++++++++++++++++++++++++++---------------
 1 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs
index bdc396d..6a599e5 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs
@@ -74,12 +74,14 @@
                 TextAlignment = TextAlignment.CenterLeft,
                 Radius = (uint)Application.GetRealHeight (0),
                 TextColor = SkinStyle.Current.TextColor1,
-                //Text = account,
-#if DEBUG
-                //Text = "18926269190@189.cn"
-                Text = "721343314@qq.com"
-#endif
+                Text = account,
+
             };
+#if DEBUG
+            //Text = "18926269190@189.cn"
+            etAccount.Text = "721343314@qq.com";
+#endif
+
             accountView.AddChidren (etAccount);
 
             var userConfigBytes = IO.FileUtils.ReadFile ("AccountListDB");
@@ -93,8 +95,13 @@
             }
             var accountList = accountListDB.account;
 
-            
+            //鑷姩濉啓璐﹀彿
+            if (string.IsNullOrEmpty (account)) {
+                if (accountList.Count > 0) {
+                    etAccount.Text = accountList [accountList.Count - 1];
+                }
 
+            }
             var accountListView = new VerticalScrolViewLayout () {
                 Width = Application.GetRealWidth (500),
                 Height = Application.GetRealHeight (85 * 2),
@@ -121,11 +128,12 @@
                 TextAlignment = TextAlignment.CenterLeft,
                 SecureTextEntry = true,
                 TextColor = SkinStyle.Current.TextColor1,
-#if DEBUG
-                Text = "123456"
-#endif
-                //Text = password,
+
+                Text = password,
             };
+#if DEBUG
+            etPasswrod.Text = "123456";
+#endif
             passwrodView.AddChidren (etPasswrod);
 
             Button btnShowPassword = new Button () {
@@ -133,8 +141,8 @@
                 Y = etPasswrod.Y + Application.GetRealHeight (12),
                 Width = Application.GetRealWidth (73),
                 Height = Application.GetRealHeight (60),
-                UnSelectedImagePath = "CrabtreeAdd/ShowPW.png",
-                SelectedImagePath = "CrabtreeAdd/HidePW.png",
+                UnSelectedImagePath = "CrabtreeAdd/HidePW.png",
+                SelectedImagePath = "CrabtreeAdd/ShowPW.png", 
                 BorderColor = SkinStyle.Current.Transparent,
                 BorderWidth = 2,
                 Radius = 1
@@ -425,10 +433,16 @@
             var revertObj = MainPage.RequestHttps (API.Login, requestJson);
             if (revertObj.StateCode.ToUpper() == "SUCCESS") {
 
-                if (!accountListDB.account.Contains (account)) {
-                    accountListDB.account.Add (account);
-                    accountListDB.SaveAccountListDB ();
+                //if (!accountListDB.account.Contains (account)) {
+                //    accountListDB.account.Add (account);
+                //    accountListDB.SaveAccountListDB ();
+                //}
+
+                if (accountListDB.account.Contains (account)) {
+                    accountListDB.account.Remove (account);
                 }
+                accountListDB.account.Add (account);
+                accountListDB.SaveAccountListDB ();
 
                 var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<UserLoginRes> (revertObj.ResponseData.ToString ());
                 var revertData = responseDataObj;

--
Gitblit v1.8.0