| | |
| | | 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"); |
| | |
| | | } |
| | | 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), |
| | |
| | | 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 () { |
| | |
| | | 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 |
| | |
| | | NigelLoginPass++; |
| | | }; |
| | | #endif |
| | | //if (accountList.Count > 0) { |
| | | // etAccount.Text = accountList [accountList.Count-1]; |
| | | //} |
| | | |
| | | etAccount.EditorEnterAction += (obj) => { |
| | | Application.HideSoftInput (); |
| | | etPasswrod.Foucs = true; |
| | |
| | | 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; |
| | |
| | | // //当住宅为空时先提示用户新建住宅 |
| | | //} else { |
| | | var revertRoomData = mResidenceRes.PageData; |
| | | |
| | | if (UserConfig.Instance.CurrentRegion == null) { |
| | | if (revertRoomData != null && revertRoomData.Count > 0) { |
| | | var bFind = false; |
| | |
| | | } else { |
| | | //刷新住宅 解决子账号问题 |
| | | UserConfig.Instance.CurrentRegion = findRoom; |
| | | |
| | | Room.InitAllRoom (); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | ////原方案 |
| | | //GetAllBindGatewarysPagger (revertRoomData); |
| | | ////获取当前住宅网关方案 |
| | |
| | | { |
| | | UserConfig.Instance.SaveUserConfig (); |
| | | MainPage.LoginUser.LastTime = DateTime.Now; |
| | | //MainPage.IsOtherDevicesLogin = false; |
| | | |
| | | if (UserConfig.Instance.CheckHomeGatewaysNotEmpty ()) { |
| | | UserConfig.Instance.HomeLists = revertRoomData; |