From dce6c3481a37216292724013ff9d2b75ceb82f86 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 10 六月 2020 15:47:28 +0800
Subject: [PATCH] 添加小度的代码
---
ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs | 33 +++++++++++++++------------------
1 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs b/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
index 1def82e..e0fe24b 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
@@ -32,9 +32,10 @@
/// <param name="account">鐧婚檰璐﹀彿</param>
public void ShowForm(string account = "")
{
- if (Config.Instance.IsLogin == true)
+ if (account == string.Empty)
{
- return;
+ //浣跨敤涓婁竴娆$櫥闄嗙殑璐﹀彿
+ account = Common.Config.Instance.Account;
}
CommonPage.Instance.IsDrawerLockMode = true;
this.Tag = "Login";
@@ -189,10 +190,10 @@
var btnTiyan = new NormalViewControl(300, 100, true);
btnTiyan.Y = btnLoginByCode.Y;
btnTiyan.TextAlignment = TextAlignment.Center;
- btnTiyan.TextColor = UserCenterColor.Current.TextGrayColor3;
+ btnTiyan.TextColor = UserCenterColor.Current.TextOrangeColor;
btnTiyan.TextSize = 12;
btnTiyan.Gravity = Gravity.CenterHorizontal;
- btnTiyan.Text = "娓稿浣撻獙";
+ btnTiyan.TextID = R.MyInternationalizationString.uExperienceAccount;
frameMidBack.AddChidren(btnTiyan);
btnTiyan.ButtonClickEvent += (sender, e) =>
{
@@ -207,7 +208,7 @@
{
this.RemoveFromParent();
CommonPage.Instance.RemoveViewByTag("Login");
- UserPage.Instance.Fresh();
+ UserPage.Instance.ReFreshControl();
});
});
};
@@ -637,14 +638,10 @@
//瀛椾綋鎬诲搴�
int fontWidth = 0;
int btnWidth = 0;
-#if Android
+
//鐗规畩鐨勮宸��
- int speceilValue = Application.GetRealWidth(20);
-#endif
-#if iOS
- //鐗规畩鐨勮宸��
- int speceilValue = Application.GetRealWidth(10);
-#endif
+ int speceilValue = ControlCommonResourse.TwoTextSpace;
+
//鎴戝凡闃呰骞跺悓鎰�
var btnMsg1 = new NormalViewControl(100, 90, true);
btnMsg1.Gravity = Gravity.CenterVertical;
@@ -845,7 +842,7 @@
HomePage.Instance.ShowLoginLoadView();
});
var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
- var homes = await House.GetHomeLists();
+ var homes = await HdlResidenceLogic.Current.GetHomeListsFromDb();
//鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
//鍚姩ZigBee
@@ -855,7 +852,7 @@
{
this.RemoveFromParent();
CommonPage.Instance.RemoveViewByTag("Login");
- UserPage.Instance.Fresh();
+ UserPage.Instance.ReFreshControl();
});
}
else
@@ -911,7 +908,7 @@
var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
var revertData = responseDataObj;
//鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄�
- UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
+ Config.Instance.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
Config.Instance.Account = revertData.Account;
Config.Instance.MD5PWD = revertData.MD5PWD;
Config.Instance.Guid = revertData.Guid;
@@ -1098,7 +1095,7 @@
var revertData = responseDataObj;
Config.ReFresh();
//鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄�
- UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
+ Config.Instance.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
Config.Instance.Account = revertData.Account;
Config.Instance.Password = i_psw;
Config.Instance.MD5PWD = revertData.MD5PWD;
@@ -1108,7 +1105,7 @@
Config.Instance.Save();
var resultRegID = await CommonPage.Instance.PushRegID();
- var homes = await House.GetHomeLists();
+ var homes = await HdlResidenceLogic.Current.GetHomeListsFromDb();
//鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
await UserCenterLogic.InitUserCenterMenmoryAndThread();
//鍚姩ZigBee
@@ -1119,7 +1116,7 @@
CommonPage.Loading.Hide();
this.RemoveFromParent();
CommonPage.Instance.RemoveViewByTag("Login");
- UserPage.Instance.Fresh();
+ UserPage.Instance.ReFreshControl();
});
return;
}
--
Gitblit v1.8.0