JLChen
2020-11-23 8c1bf42c5fca66625b59728006bd47bae0b6a3ad
Revert "Merge branch 'CJL' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into CJL"

This reverts commit eb51679c618d5027070fbd6f3c0519f0f17e7d7d, reversing
changes made to abc4e92e199962da76ae58c611f2616066053194.
6个文件已添加
34个文件已修改
1 文件已重命名
3102 ■■■■ 已修改文件
HDL-ON_iOS/AppDelegate.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/MqttCommon.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/Utlis.cs 159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Net/Mqtt_Cloud.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequestBase.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DriverLayer/Control_Udp_Bus.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DriverLayer/UdpSocket.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/DB_ResidenceData.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/AppUnlockPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/ConfirmDialog.cs 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/LineView.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/TopViewDiv.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/TopViewDivBLL.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/WebViewDialog.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/Widget/TextButton.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPageBLL.cs 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/RegisterPage.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/RegisterPageBLL.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/AccountBindInfoPage.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/BindAccountPage.cs 388 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs 111 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindVerificationCodePage.cs 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs 225 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindVerificationCodePage.cs 711 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/ChooseShareMemberTargetListPageBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPageBLL.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs 99 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordOptionPage.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs 305 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordVerificationCodePage.cs 202 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/AppDelegate.cs
@@ -23,7 +23,7 @@
        //    UserConfig.Instance.IsAppStoreVersionNewer = Harpy.Harpy.SharedInstance.TestIsAppStoreVersionNewer;
        //    UserConfig.Instance.StoreVersion = Harpy.Harpy.SharedInstance.CurrentAppStoreVersion;
        //    UserConfig.Instance.SaveUserConfig();
        //    if (Shared.SimpleControl.MainPage.LoginUser.AccountString == @"464027401@qq.com")
        //    if (Shared.SimpleControl. UserInfo.Current.AccountString == @"464027401@qq.com")
        //    {
        //        return $"TestIsAppStoreVersionNewer : {UserConfig.Instance.IsAppStoreVersionNewer};;  CurrentAppStoreVersion : {UserConfig.Instance.StoreVersion}";
        //    }
@@ -196,9 +196,11 @@
            string nsCount = NSLocale.CurrentLocale.CountryCode;
            if (MainPage.LoginUser != null && nsCount != MainPage.LoginUser.areaCode.ToString())
            if ( UserInfo.Current != null && nsCount !=  UserInfo.Current.areaCode.ToString())
            {
                int.TryParse(nsCount,out MainPage.LoginUser.areaCode);
                //int.TryParse(nsCount,out  UserInfo.Current.areaCode);
                //2020-11-18
                 UserInfo.Current.areaCode = nsCount;
                OnAppConfig.Instance.SaveUserConfig();
            }
            application.IdleTimerDisabled = true;
HDL-ON_iOS/Info.plist
@@ -6,6 +6,26 @@
    <array>
        <dict>
            <key>CFBundleURLName</key>
            <string>weixin</string>
        </dict>
        <dict>
            <key>CFBundleURLName</key>
            <string>AispeechMobile</string>
        </dict>
        <dict>
            <key>CFBundleURLName</key>
            <string>xiaoduapp</string>
        </dict>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>hdlonpro</string>
            </array>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
        </dict>
        <dict>
            <key>CFBundleURLName</key>
            <string>qqmusic</string>
        </dict>
    </array>
@@ -87,7 +107,13 @@
    <string>获取天气预报</string>
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>weixinULAPI</string>
        <string>weixin</string>
        <string>xiaoduapp</string>
        <string>AispeechMobile</string>
        <string>qqmusic</string>
    </array>
    <key>CFBundleDevelopmentRegion</key>
    <string>zh_CN</string>
</dict>
</plist>
HDL_ON/Common/MqttCommon.cs
@@ -158,7 +158,7 @@
//                    try
//                    {
//                        System.Threading.Thread.Sleep(200);
//                        //if (!MainPage.LoginUser.IsLogin) {
//                        //if (! UserInfo.Current.IsLogin) {
//                        //    continue;
//                        //}
//                        if (!CommonPage.IsRemote) continue;
@@ -207,7 +207,7 @@
//                    var topicFilterPush2 = new TopicFilter
//                    {
//                        Topic = $"/BusGateWayToClient/{MainPage.LoginUser.ID}" + PushNotifySqueeze,
//                        Topic = $"/BusGateWayToClient/{ UserInfo.Current.ID}" + PushNotifySqueeze,
//                        QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce,
//                        //QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce
//                    };
@@ -255,7 +255,7 @@
//                return;
//            }
//            if (!MainPage.LoginUser.IsLogin)
//            if (! UserInfo.Current.IsLogin)
//            {
//                return;
//            }
@@ -315,7 +315,7 @@
//                                //    ReceiveNotifySqueezeAsync (mMes);
//                                //} else
//                                if (topic == $"/BusGateWayToClient/{MainPage.LoginUser.ID}" + PushNotifySqueeze)
//                                if (topic == $"/BusGateWayToClient/{ UserInfo.Current.ID}" + PushNotifySqueeze)
//                                {
//                                    var mMes = System.Text.Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
//                                    //新挤下线主题方案 收到挤下线主题
@@ -679,7 +679,7 @@
//                    var username = MqttInfoConfig.Instance.mMqttInfo.connEmqUserName;
//                    var passwordRemote = MqttInfoConfig.Instance.mMqttInfo.connEmqPwd;
//                    MqttInfoConfig.Instance.CurRemoteMACInfo.clientId = clientId;
//                    //MqttInfoConfig.Instance.CurRemoteMACInfo.LoginAccessToken = MainPage.LoginUser.LoginTokenString;
//                    //MqttInfoConfig.Instance.CurRemoteMACInfo.LoginAccessToken =  UserInfo.Current.LoginTokenString;
//                    //获取参数成功,保存到本地并标记为true
//                    MqttInfoConfig.Instance.IfGetMqttInfoSuccess = true;
@@ -818,19 +818,19 @@
//            //断开远程连接
//            CommonPage.IsRemote = false;
//            if (!MainPage.LoginUser.IsLogin)
//            if (! UserInfo.Current.IsLogin)
//            {
//                return;
//            }
//            DisConnectRemoteMqttClient("挤下线");
//            MainPage.LoginUser.LastTime = DateTime.MinValue;
//            MainPage.LoginUser.SaveUserInfo();
//             UserInfo.Current.LastTime = DateTime.MinValue;
//             UserInfo.Current.SaveUserInfo();
//            Room.Lists.Clear();
//            ////删除推送数据
//            //var webclient = new System.Net.WebClient ();
//            //webclient.Headers.Add (System.Net.HttpRequestHeader.Authorization, MainPage.LoginUser.LoginTokenString);
//            //webclient.Headers.Add (System.Net.HttpRequestHeader.Authorization,  UserInfo.Current.LoginTokenString);
//            //webclient.DownloadStringAsync (new Uri ("https://global.hdlcontrol.com/HangZhouHdlCloudApi/ZigbeeUsers/SignOut"));
@@ -838,7 +838,7 @@
//            Application.RunOnMainThread(() =>
//            {
//                Utlis.ShowAppLinkStatus(AppLinkStatus.WiFi);
//                new Shared.SimpleControl.Phone.AccountLogin(MainPage.LoginUser.AccountString, "").Show();
//                new Shared.SimpleControl.Phone.AccountLogin( UserInfo.Current.AccountString, "").Show();
//                SharedMethod.SharedMethod.CurPageLayout = null;
//                //CommonPage.IsRemote = false;
@@ -852,7 +852,7 @@
//            //2020-06-30 删除推送数据
//            ForceUpdateUtlis.Current.SignOut();
//#if HDL
//            if (!String.IsNullOrEmpty (MainPage.LoginUser.AllVisionRegisterDevUserNameGuid)) {
//            if (!String.IsNullOrEmpty ( UserInfo.Current.AllVisionRegisterDevUserNameGuid)) {
//                com.freeview.global.Video.Logout ();
//            }///BusGateWayToClient/320c1fea-1866-4708-8277-e2321a4dd236/NotifyGateWayInfoChange
//#endif
@@ -945,7 +945,7 @@
//                        await RemoteMqttClient.PublishAsync(new MqttApplicationMessage { Topic = topicName, Retain = false, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce });
//                        break;
//                    case 4://发布新方案的挤下线主题
//                        topicName = $"/BusGateWayToClient/{MainPage.LoginUser.ID}" + PushNotifySqueeze;
//                        topicName = $"/BusGateWayToClient/{ UserInfo.Current.ID}" + PushNotifySqueeze;
//                        //message = System.Text.Encoding.UTF8.GetBytes (PushSignStr);
//                        await RemoteMqttClient.PublishAsync(new MqttApplicationMessage { Topic = topicName, Payload = message, Retain = false, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce });
//                        break;
@@ -1003,7 +1003,7 @@
//        {
//            var mqttInfoRequestPar = new GetConnMqttInfoObj()
//            {
//                LoginAccessToken = MainPage.LoginUser.LoginTokenString,
//                LoginAccessToken =  UserInfo.Current.LoginTokenString,
//                PlatformStr = GetRandomKey(),
//                PublishPayloadJsonStr = PushSignStr,
//                Mac = UserConfig.Instance.GatewayMAC,
@@ -1029,7 +1029,7 @@
//                            MqttInfoConfig.Instance.CurRemoteMACInfo = mqttInfoRequestResult_Obj.AccountAllGateways.Find((obj) => obj.mac == UserConfig.Instance.GatewayMAC);
//                            if (MqttInfoConfig.Instance.CurRemoteMACInfo != null)
//                            {
//                                //MqttInfoConfig.Instance.CurRemoteMACInfo.LoginAccessToken = MainPage.LoginUser.LoginTokenString;
//                                //MqttInfoConfig.Instance.CurRemoteMACInfo.LoginAccessToken =  UserInfo.Current.LoginTokenString;
//                                MqttInfoConfig.Instance.CurRemoteMACInfo.clientId = clientId;
//                                //----第三步 开始连接
//                                await MQTTConnectAsync();
HDL_ON/Common/Utlis.cs
@@ -1,5 +1,8 @@
using System;
namespace HDL_ON.Common
using Shared;
using System.Text.RegularExpressions;
namespace HDL_ON
{
    /// <summary>
    /// 常用工具类
@@ -15,5 +18,159 @@
            Console.WriteLine(mes);
#endif
        }
        /// <summary>
        /// 弹窗提示
        /// </summary>
        /// <param name="mes"></param>
        public static void ShowAlertOnMainThread(string mes)
        {
            Application.RunOnMainThread(() => {
                new Alert("", mes, Language.StringByID(StringId.Close)).Show();
            });
    }
        /// <summary>
        /// ShowTip
        /// </summary>
        /// <param name="mes"></param>
        /// <param name="closeTime">关闭时间</param>
        public static void ShowTip(String mes, int closeTime = 2)
        {
            var tip = new Tip()
            {
                Text = mes,
                CloseTime = closeTime,
                Direction = AMPopTipDirection.None
            };
            tip.Show(MainPage.BaseView);
        }
        #region ■ 各种正则检测_______________________
        /// <summary>
        /// 用于中国大陆验证手机号正则表达式
        /// 以1开头,11位
        /// </summary>
        public static string PhoneRegexStr = "^[1][0-9]{10}$";
        /// <summary>
        /// 用于验证非中国大陆手机号正则表达式
        /// </summary>
        public static string PhoneForForeignRegexStr = "^[0-9]*$";
        /// <summary>
        /// 用于验证邮箱正则表达式
        /// </summary>
        public static string EmailRegexStr = "^\\s*([A-Za-z0-9_-]+(\\.\\w+)*@(\\w+\\.)+\\w{2,5})\\s*$";
        /// <summary>
        /// 判断是否包含大写字母
        /// </summary>
        /// <returns><c>true</c>, if contain upper was checked, <c>false</c> otherwise.</returns>
        /// <param name="value">Value.</param>
        public static bool CheckContainUpper(string value)
        {
            Regex reg = new Regex("[A-Z]+");
            return reg.IsMatch(value);
        }
        /// <summary>
        /// 判断是否包含小写字母
        /// </summary>
        /// <returns><c>true</c>, if contain lower was checked, <c>false</c> otherwise.</returns>
        /// <param name="value">Value.</param>
        public static bool CheckContainLower(string value)
        {
            Regex reg = new Regex("[a-z]+");
            return reg.IsMatch(value);
        }
        /// <summary>
        /// 判断是否包含数字
        /// </summary>
        /// <returns><c>true</c>, if contain lower was checked, <c>false</c> otherwise.</returns>
        /// <param name="value">Value.</param>
        public static bool CheckContainNum(string value)
        {
            Regex reg = new Regex("[0-9]+");
            return reg.IsMatch(value);
        }
        /// <summary>
        /// 判断是否包含符号
        /// </summary>
        /// <returns><c>true</c>, if contain lower was checked, <c>false</c> otherwise.</returns>
        /// <param name="value">Value.</param>
        public static bool CheckContainSymbol(string value)
        {
            Regex reg = new Regex("([^a-z0-9A-Z])+");
            return reg.IsMatch(value);
        }
        /// <summary>
        /// 检测邮箱是否合法
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        public static bool CheckEmail(string email)
        {
            Regex reg = new Regex(EmailRegexStr);
            return reg.IsMatch(email);
        }
        /// <summary>
        /// 检测手机号是否合法
        /// </summary>
        /// <param name="phoneNumber">手机号</param>
        /// <param name="areaCode">地区代码</param>
        /// <returns></returns>
        public static bool CheckPhoneNumber(string phoneNumber, string areaCode)
        {
            //校验外国手机号
            if (areaCode != "86")
            {
                Regex reg = new Regex(PhoneForForeignRegexStr);
                return reg.IsMatch(phoneNumber);
            }
            else
            {
                //校验国内手机号
                Regex reg = new Regex(PhoneRegexStr);
                return reg.IsMatch(phoneNumber);
            }
        }
        #endregion
        /// <summary>
        /// TextButton
        /// 根据文本,计算按钮它实际的宽度
        /// </summary>
        /// <param name="btn"></param>
        /// <param name="extendWidth">补充宽度</param>
        /// <returns></returns>
        public static int GetRealWidthByTextButton(Button btn, int extendWidth = 1)
        {
            if (string.IsNullOrEmpty(btn.Text)) { return Application.GetRealWidth(extendWidth); }
            return btn.GetTextWidth() + Application.GetRealWidth(extendWidth);
        }
        /// <summary>
        /// 根据文本,计算按钮它实际的宽度
        /// </summary>
        /// <returns></returns>
        public static int GetRealWidthByText(Button btn)
        {
            if (string.IsNullOrEmpty(btn.Text)) { return Application.GetRealWidth(4); }
#if __IOS__
            //需要增加一个误差值
            return btn.GetTextWidth() + Application.GetRealWidth(8);
#else
            //需要增加一个误差值
            return btn.GetTextWidth() + Application.GetRealWidth(4);
#endif
        }
    }
}
HDL_ON/DAL/Net/Mqtt_Cloud.cs
@@ -116,7 +116,7 @@
        {
            //追加:没有远程连接的权限
            if (remoteMqttIsConnecting
               || remoteIsConnected || !MainPage.LoginUser.IsLogin)
               || remoteIsConnected || ! UserInfo.Current.IsLogin)
            {
                return;
            }
@@ -221,7 +221,7 @@
                    var mqttInfoRequestPar = new RemoteRequestParameters()
                    {
                        PlatformStr = "ON",
                        LoginAccessToken = MainPage.LoginUser.loginTokenString,
                        LoginAccessToken =  UserInfo.Current.loginTokenString,
                        RequestVersion = MainPage.VersionString,
                        RequestProtocolType = 0,
                        RequestSource = 1,
@@ -257,7 +257,7 @@
                                    }
                                    if (CurRemoteMACInfo != null)
                                    {
                                        CurRemoteMACInfo.LoginAccessToken = MainPage.LoginUser.loginTokenString;
                                        CurRemoteMACInfo.LoginAccessToken =  UserInfo.Current.loginTokenString;
                                        CurRemoteMACInfo.clientId = clientId;
                                        mqttEncryptKey = CurRemoteMACInfo.isNewBusproGateway ? CurRemoteMACInfo.aesKey : "";
@@ -304,7 +304,7 @@
        //static void ReceiveNotifyBusGateWayInfoChange()
        //{
        //    var gatewayListUrl = @"https://developer.hdlcontrol.com/Center/Center/GetGatewayPagger"; //App、Buspro软件登录后获取网关列表 http 请求
        //    var gatewayListRequestPar = new RemoteRequestParameters() { Mac = CurRemoteMACInfo.mac, LoginAccessToken = MainPage.LoginUser.loginTokenString, RequestVersion = "RequestVersion1", RequestProtocolType = 0, RequestSource = 1 };
        //    var gatewayListRequestPar = new RemoteRequestParameters() { Mac = CurRemoteMACInfo.mac, LoginAccessToken =  UserInfo.Current.loginTokenString, RequestVersion = "RequestVersion1", RequestProtocolType = 0, RequestSource = 1 };
        //    var gatewayListRequestResult = MainPage.RequestHttps("", Newtonsoft.Json.JsonConvert.SerializeObject(gatewayListRequestPar), false, false, gatewayListUrl);
        //    var gatewayListRequestResult_Obj = Newtonsoft.Json.JsonConvert.DeserializeObject<MqttRemoteInfo>(gatewayListRequestResult.ResponseData.ToString());
        //    if (gatewayListRequestResult_Obj != null && gatewayListRequestResult_Obj.pageData.Count > 0)
@@ -322,12 +322,12 @@
            if (mMes == PushSignStr) return;//是自己的登录推送不处理
            //断开远程连接
            MainPage.IsRemote = false;
            if (!MainPage.LoginUser.IsLogin)
            if (! UserInfo.Current.IsLogin)
            {
                return;
            }
            MainPage.LoginUser.lastTime = DateTime.MinValue;
            MainPage.LoginUser.SaveUserInfo();
             UserInfo.Current.lastTime = DateTime.MinValue;
             UserInfo.Current.SaveUserInfo();
            string oldRegionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID.ToString());
            new System.Threading.Thread(() =>
@@ -375,7 +375,7 @@
            DisConnectRemoteMqttClient("挤下线");
            Application.RunOnMainThread(() =>
            {
                MainPage.GoLoginPage(MainPage.LoginUser);
                MainPage.GoLoginPage( UserInfo.Current);
            });
        }
HDL_ON/DAL/Server/HttpServerRequestBase.cs
@@ -20,7 +20,7 @@
            webClient.Headers.Add("CONTENT-TYPE", "application/json");
            if (needAuthorization)
            {
                webClient.Headers.Add("Authorization", MainPage.LoginUser.loginTokenString);
                webClient.Headers.Add("Authorization",  UserInfo.Current.loginTokenString);
            }
            byte[] bytes = null;
            try
HDL_ON/DAL/Server/HttpUtil.cs
@@ -152,8 +152,9 @@
            try
            {
                //if (string.IsNullOrEmpty (urlHead)) {
                //    urlHead = APIInfoConfig.Current.RequestHttpsHost;
                //if (string.IsNullOrEmpty(urlHead))
                //{
                //    urlHead = UserInfo.Current.RequestHttpsHost;
                //}
                //string requestFullUrl = urlHead + apiPath;
@@ -171,9 +172,9 @@
                if (string.IsNullOrEmpty(replaceToken))
                {
                    if (MainPage.LoginUser != null)
                    if(UserInfo.Current != null)
                    {/* 如果不需要验证Token可以不用传入 */
                        request.AddHeader("Authorization", MainPage.LoginUser.loginTokenString);
                        request.AddHeader("Authorization",  UserInfo.Current.loginTokenString);
                    }
                }
                else
@@ -227,20 +228,20 @@
                    }
                    catch (Exception ex)
                    {
                        HDL_ON.Common.Utlis.WriteLine(ex.Message);
                        HDL_ON.Utlis.WriteLine(ex.Message);
                        return new ResponsePackNew() { Code = "DATA_EXCEPTION" };
                    }
                }
                else
                {
                    HDL_ON.Common.Utlis.WriteLine(response.Content);
                    HDL_ON.Utlis.WriteLine(response.Content);
                    return new ResponsePackNew() { Code = "NETWORK_ERROR" };
                }
            }
            catch (Exception ex)
            {
                HDL_ON.Common.Utlis.WriteLine(ex.Message);
                HDL_ON.Utlis.WriteLine(ex.Message);
                return new ResponsePackNew() { Code = "NETWORK_ERROR" };
            }
@@ -264,7 +265,7 @@
            try
            {
                //if (string.IsNullOrEmpty (urlHead)) {
                //    urlHead = APIInfoConfig.Current.RequestHttpsHost;
                //    urlHead = UserInfo.Current.RequestHttpsHost;
                //}
                //string requestFullUrl = urlHead + apiPath;
@@ -280,9 +281,9 @@
                if (string.IsNullOrEmpty(replaceToken))
                {
                    if (MainPage.LoginUser != null)
                    if ( UserInfo.Current != null)
                    {/* 如果不需要验证Token可以不用传入 */
                        request.AddHeader("Authorization", MainPage.LoginUser.loginTokenString);
                        request.AddHeader("Authorization",  UserInfo.Current.loginTokenString);
                    }
                }
                else
@@ -308,7 +309,7 @@
            }
            catch (Exception ex)
            {
                HDL_ON.Common.Utlis.WriteLine(ex.Message);
                HDL_ON.Utlis.WriteLine(ex.Message);
                return null;
            }
            #endregion
@@ -334,7 +335,7 @@
            {
                //if (string.IsNullOrEmpty (urlHead)) {
                //    urlHead = APIInfoConfig.Current.RequestHttpsHost;
                //    urlHead = UserInfo.Current.RequestHttpsHost;
                //}
                //string requestFullUrl = urlHead + apiPath;
@@ -351,9 +352,9 @@
                if (string.IsNullOrEmpty(replaceToken))
                {
                    if (MainPage.LoginUser != null)
                    if ( UserInfo.Current != null)
                    {/* 如果不需要验证Token可以不用传入 */
                        request.AddHeader("Authorization", MainPage.LoginUser.loginTokenString);
                        request.AddHeader("Authorization",  UserInfo.Current.loginTokenString);
                    }
                }
                else
@@ -399,20 +400,20 @@
                    }
                    catch (Exception ex)
                    {
                        HDL_ON.Common.Utlis.WriteLine(ex.Message);
                        HDL_ON.Utlis.WriteLine(ex.Message);
                        return new ResponsePackNew() { Code = "DATA_EXCEPTION" };
                    }
                }
                else
                {
                    HDL_ON.Common.Utlis.WriteLine(response.Content);
                    HDL_ON.Utlis.WriteLine(response.Content);
                    return new ResponsePackNew() { Code = "NETWORK_ERROR" };
                }
            }
            catch (Exception ex)
            {
                HDL_ON.Common.Utlis.WriteLine(ex.Message);
                HDL_ON.Utlis.WriteLine(ex.Message);
                return new ResponsePackNew() { Code = "NETWORK_ERROR" };
            }
@@ -478,11 +479,25 @@
                    string str = string.Empty;
                    foreach (KeyValuePair<string, object> item in paramDictionary)
                    {
                        //Value为null不参加校验
                        if (item.Value != null)
                        {
                            //Value.ToString()为null或者""也不参加校验
                            if (!string.IsNullOrEmpty(item.Value.ToString()))
                            {
                                //如果是bool类型,要转小写
                                if (item.Value is bool)
                                {
                                    str += item.Key + "=" + item.Value.ToString().ToLower() + "&";
                                }
                                else
                        {
                            str += item.Key + "=" + item.Value.ToString() + "&";
                        }
                    }
                        }
                    }
                    //2.3 拼接SECRET_KEY
                    str = str.Substring(0, str.Length - 1) + SECRET_KEY;
                    //2.4 MD5转换+转小写
HDL_ON/DriverLayer/Control_Udp_Bus.cs
@@ -86,13 +86,13 @@
            try
            {
                //账号没登录不回复
                if (MainPage.LoginUser == null || !MainPage.LoginUser.IsLogin)
                if ( UserInfo.Current == null || ! UserInfo.Current.IsLogin)
                {
                    return;
                }
                Control.ins.ChangeCommunicationMode(CommunicationMode.tcp_local_server);
                var sendStr = MainPage.LoginUser.accountString;
                var sendStr =  UserInfo.Current.accountString;
                if (usefullBytes.Length == 0)
                {
                    SendRemark(sendStr);
HDL_ON/DriverLayer/UdpSocket.cs
@@ -27,7 +27,7 @@
        {
            get
            {
                if (MainPage.LoginUser != null && Entity.DB_ResidenceData.residenceData != null)
                if ( UserInfo.Current != null && Entity.DB_ResidenceData.residenceData != null)
                {
                    return Entity.DB_ResidenceData.residenceData.GatewayType == 0 ? 6000 : 8585;
                }
HDL_ON/Entity/DB_ResidenceData.cs
@@ -33,11 +33,11 @@
                }
                else
                {
                    var curRegion = MainPage.LoginUser.regionList.Find((obj) => obj.RegionID == CurReginID);
                    var curRegion =  UserInfo.Current.regionList.Find((obj) => obj.RegionID == CurReginID);
                    //if (curRegion == null)
                    //{
                    //    CurReginID = MainPage.LoginUser.regionList[0].RegionID;
                    //    return MainPage.LoginUser.regionList[0];
                    //    CurReginID =  UserInfo.Current.regionList[0].RegionID;
                    //    return  UserInfo.Current.regionList[0];
                    //}
                    return curRegion;
                }
HDL_ON/UI/UI0-Public/AppUnlockPage.cs
@@ -9,7 +9,7 @@
    {
        void LoadOption()
        {
            if (MainPage.LoginUser == null)
            if ( UserInfo.Current == null)
            {
                return;
            }
HDL_ON/UI/UI0-Public/ConfirmDialog.cs
New file
@@ -0,0 +1,153 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
namespace HDL_ON.UI
{
    /// <summary>
    /// 通用二次确认界面
    /// 可以自定义按钮文字
    /// </summary>
    public class ConfirmDialog : Dialog
    {
        /// <summary>
        ///
        /// </summary>
        public ConfirmDialog()
        {
        }
        /// <summary>
        /// 初始化Dialog
        /// </summary>
        /// <param name="titleId"></param>
        /// <param name="msgId"></param>
        /// <param name="okAction"></param>
        /// <param name="cancelAction"></param>
        /// <param name="cancelID"></param>
        /// <param name="confirmID"></param>
        void ShowDialogBase(int titleId, int msgId, Action okAction, Action cancelAction, int cancelID = StringId.Cancel, int confirmID = StringId.Confirm)
        {
            this.BackgroundColor = CSS_Color.DialogTransparentColor1;
            FrameLayout contentView = new FrameLayout()
            {
                Gravity = Gravity.Center,
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(140),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                BorderColor = 0x00000000,
                BorderWidth = 0,
                Radius = (uint)Application.GetMinRealAverage(10),
            };
            this.AddChidren(contentView);
            Button btnTitle = new Button()
            {
                Y = Application.GetRealHeight(16),
                Height = Application.GetRealHeight(30),
                TextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
                TextID = titleId,
            };
            contentView.AddChidren(btnTitle);
            Button btnMsg = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Height = Application.GetRealHeight(25),
                Y = btnTitle.Bottom,
                Width = Application.GetRealHeight(200),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextID = msgId,
            };
            contentView.AddChidren(btnMsg);
            Button btnLine = new Button()
            {
                Y = Application.GetRealHeight(96),
                Height = Application.GetRealHeight(1),
                Width = Application.GetRealWidth(270 / 2),
                BackgroundColor = CSS_Color.DividingLineColor,
            };
            contentView.AddChidren(btnLine);
            Button btnCancel = new Button()
            {
                Y = btnLine.Bottom,
                Width = Application.GetRealWidth(135),
                Height = Application.GetRealHeight(43),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = cancelID,
            };
            contentView.AddChidren(btnCancel);
            Button btnConfirm = new Button()
            {
                X = btnCancel.Right,
                Y = btnLine.Y,
                Width = Application.GetRealWidth(135),
                Height = Application.GetRealHeight(45),
                TextAlignment = TextAlignment.Center,
                //TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.MainBackgroundColor,
                BackgroundColor = CSS_Color.MainColor,
                TextID = confirmID,
            };
            contentView.AddChidren(btnConfirm);
            //例:右下圆角 大小为50
            int mRectCornerID = HDLUtils.RectCornerBottomRight;
            btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID);
            btnCancel.MouseUpEventHandler += (sender, e) =>
            {
                this.Close();
                cancelAction?.Invoke();
            };
            btnConfirm.MouseUpEventHandler += (sender, e) =>
            {
                this.Close();
                okAction?.Invoke();
            };
            this.Show();
        }
        /// <summary>
        /// 加载提示Dialog
        /// </summary>
        /// <param name="titleId"></param>
        /// <param name="msgId"></param>
        /// <param name="callBackAction"></param>
        public void ShowDialog(int titleId, int msgId, Action okAction, Action cancelAction = null)
        {
            this.ShowDialogBase(titleId, msgId, okAction, cancelAction);
        }
        /// <summary>
        /// 加载提示Dialog
        /// 可以自定义按钮文字
        /// </summary>
        /// <param name="titleId"></param>
        /// <param name="msgId"></param>
        /// <param name="okAction"></param>
        /// <param name="cancelAction"></param>
        /// <param name="cancelID"></param>
        /// <param name="confirmID"></param>
        public void ShowDialog(int titleId, int msgId, Action okAction, Action cancelAction, int cancelID, int confirmID)
        {
            this.ShowDialogBase(titleId, msgId, okAction, cancelAction, cancelID, confirmID);
        }
    }
}
HDL_ON/UI/UI0-Public/LineView.cs
New file
@@ -0,0 +1,20 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
namespace HDL_ON.UI
{
    /// <summary>
    /// 通用LineView
    /// </summary>
    public class LineView : FrameLayout
    {
        public LineView()
        {
            X = Application.GetRealWidth(16);
            Height = Application.GetRealHeight(1);
            Width = Application.GetRealWidth(343);
            BackgroundColor = CSS_Color.DividingLineColor;
        }
    }
}
HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -20,7 +20,6 @@
        /// </summary>
        FrameLayout contentView;
        /// <summary>
        /// 后退按钮
        /// </summary>
@@ -32,6 +31,11 @@
        string title;
        /// <summary>
        /// 是否需要关闭页面
        /// </summary>
        bool needClose = true;
        /// <summary>
        /// 后退时触发对事件
        /// </summary>
        Action backAction;
@@ -43,6 +47,19 @@
        }
        /// <summary>
        /// TopViewDiv
        /// </summary>
        /// <param name="frame">父控件</param>
        /// <param name="str">标题</param>
        /// <param name="needClose">是否需要关闭页面</param>
        public TopViewDiv(FrameLayout frame, string str, bool needClose)
        {
            baseView = frame;
            title = str;
            this.needClose = needClose;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dialog">显示的dialog</param>
HDL_ON/UI/UI0-Public/TopViewDivBLL.cs
@@ -15,6 +15,8 @@
        {
            btnBack.MouseUpEventHandler = (sender, e) => {
                backAction?.Invoke();
                if (needClose)
                {
                if (baseView != null)
                {
                    baseView.RemoveFromParent();
@@ -23,6 +25,7 @@
                {
                    baseDialog.Close();
                }
                }
            };
        }
HDL_ON/UI/UI0-Public/WebViewDialog.cs
New file
@@ -0,0 +1,42 @@
using System;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
    /// <summary>
    /// WebViewDialog
    /// 加载网页
    /// </summary>
    public class WebViewDialog : Dialog
    {
        FrameLayout bodyView;
        public WebViewDialog()
        {
            bodyView = new FrameLayout();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="titleStr"></param>
        /// <param name="url"></param>
        public void LoadPage(string titleStr, string url)
        {
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            this.AddChidren(bodyView);
            new TopViewDiv(this, bodyView, titleStr).LoadTopView();
            //WebView
            var webView = new WebView() {
                Y = Application.GetRealHeight(64),
                Height = bodyView.Height - Application.GetRealHeight(64),
            };
            bodyView.AddChidren(webView);
            //加载网址
            webView.LoadRequest(url);
            this.Show();
        }
    }
}
HDL_ON/UI/UI0-Public/Widget/TextButton.cs
New file
@@ -0,0 +1,24 @@
using System;
using Shared;
#if __IOS__
using UIKit;
#endif
namespace HDL_ON.UI
{
    /// <summary>
    /// TextButton
    /// 解决iOS 文本到边框有边距问题
    /// </summary>
    public class TextButton : Button
    {
        public TextButton()
        {
#if __IOS__
            //重写修改文本到边框的内边距为0
            (this.uiView as MyButton).ContentEdgeInsets = new UIEdgeInsets(0, 0, 0, 0);
#endif
        }
    }
}
HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs
@@ -255,6 +255,7 @@
                TextSize = CSS_FontSize.TextFontSize,
                PlaceholderTextColor = CSS_Color.PromptingColor1,
                PlaceholderText = Language.StringByID(StringId.PlsEntryPhoneNumber),
                IsNumberKeyboardType = true
            };
            accountView.AddChidren(etAccount);
HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs
@@ -32,6 +32,7 @@
            {
                if (registerType == 0)
                    return;
                etAccount.IsNumberKeyboardType = true;
                etAccount.Text = registerPhone;
                etPassword.Text = "";
                etRepeatPassword.Text = "";
@@ -60,6 +61,7 @@
            {
                if (registerType == 1)
                    return;
                etAccount.IsNumberKeyboardType = false;
                etAccount.Text = registerEmail;
                etPassword.Text = "";
                etRepeatPassword.Text = "";
@@ -92,11 +94,11 @@
        {
            etAccount.TextChangeEventHandler += (sender, e) =>
            {
                Regex reg = new Regex(@"^[1]+\d{10}");
                var mFalg = reg.Match(etAccount.Text.Trim());
                //Regex reg = new Regex(@"^[1]+\d{10}");
                //var mFalg = reg.Match(etAccount.Text.Trim());
                if (registerType == 0)//手机获取验证码按钮生效条件
                {
                    if (btnGlobalRoaming.Text == "+86" && etAccount.Text.Trim().Length != 11)
                    if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode))
                    {
                        btnGetVerificationCode_Phone.IsSelected = false;
                    }
@@ -108,7 +110,7 @@
                }
                else//邮箱获取验证码按钮生效条件
                {
                    if (!mFalg.Success)
                    if (!Utlis.CheckEmail(etAccount.Text.Trim()))
                    {
                        btnGetVerificationCode_Mail.IsSelected = false;
                    }
@@ -143,9 +145,7 @@
                    if (registerType == 0)
                    {
                    btnGetVerificationCode_Phone.IsSelected = false;
                        Regex reg = new Regex(@"^[1]+\d{9}");
                        var mFalg = reg.Match(etAccount.Text.Trim());
                        if (!mFalg.Success || (btnGlobalRoaming.Text == "+86" && etAccount.Text.Trim().Length != 11))
                        if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode))
                        {
                            btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
                            btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
@@ -169,9 +169,7 @@
                    {
                        btnGetVerificationCode_Mail.IsSelected = false;
                        //邮箱方式-验证邮箱是否正确
                        var reg = new Regex("^\\s*([A-Za-z0-9_-]+(\\.\\w+)*@(\\w+\\.)+\\w{2,5})\\s*$");
                        var mFalg = reg.Match(etAccount.Text.Trim());
                        if (!mFalg.Success )
                        if (!Utlis.CheckEmail(etAccount.Text.Trim()))
                        {
                            btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
                            btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
@@ -291,6 +289,25 @@
        }
        /// <summary>
        /// 检测当前配置域名是否一致,不一致则替换
        /// </summary>
        /// <param name="result"></param>
        void CheckAndSetUserRequestHost(ResponsePackNew result) {
            try
            {
                var mGlobalRegionListObj = Newtonsoft.Json.JsonConvert.DeserializeObject<GlobalRegionListRes>(result.Data.ToString());
                if (UserInfo.Current.RequestHttpsHost != mGlobalRegionListObj.regionUrl)
                {
                    UserInfo.Current.RequestHttpsHost = mGlobalRegionListObj.regionUrl;
                    UserInfo.Current.GlobalRegion = mGlobalRegionListObj;
                    UserInfo.Current.SaveUserInfo();
                }
            }
            catch { }
        }
        /// <summary>
        /// 获取验证码
        /// </summary>
        void LoadEvent_GetVerificationCode()
@@ -307,12 +324,15 @@
                        var result = pm.GetRegionByAccount(account);
                        if (result.Code != StateCode.SUCCESS)
                        {
                            IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_GetRegionByAccount, result.Code);
                            IMessageCommon.Current.ShowErrorInfoAlter(result.Code);
                            return;
                        }
                        else
                        {
                            //2.已经注册过,发送验证码找回密码
                            //2.1检测当前配置域名是否一致,不一致则替换
                            CheckAndSetUserRequestHost(result);
                            //2.2已经注册过,发送验证码找回密码
                            Application.RunOnMainThread(() =>
                            {
                                //短信发送间隔60s
@@ -354,7 +374,7 @@
                            if (resultObj.Code != StateCode.SUCCESS)
                            {
                                // 提示错误
                                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Verification_Send, resultObj.Code);
                                IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                            }
                        }
                    })
@@ -423,7 +443,7 @@
                        waitPage.Hide();
                    });
                    // 提示错误
                    IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Member_ForgetPwd, resultObj.Code);
                    IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                }
            });
        }
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -240,8 +240,10 @@
            };
            //跳转国家区号选择界面
            EventHandler<MouseEventArgs> eHandler = (sender, e) => {
                JLCountrycode.CountryCodeView.Current.Show((countryName, code) => {
            EventHandler<MouseEventArgs> eHandler = (sender, e) =>
            {
                JLCountrycode.CountryCodeView.Current.Show((countryName, code) =>
                {
                    if (!string.IsNullOrEmpty(code))
                    {
                        phoneZoneCode = code;
@@ -476,7 +478,7 @@
            btnLocalMode.MouseUpEventHandler = (sender, e) =>
            {
                MainPage.LocalMode = true;
                MainPage.LoginUser = new UserInfo();
                 UserInfo.Current = new UserInfo();
                MainPage.GoUserPage();
            };
@@ -484,6 +486,151 @@
            #endif
            #region 隐私政策
            AddServiceAgreementControl(bodyView);
            #endregion
        }
        #region ■ 服务协议___________________________
        bool isAgreePrivacyPolicy = false;
        /// <summary>
        /// 添加服务协议控件
        /// </summary>
        /// <param name="frameBack"></param>
        private void AddServiceAgreementControl(FrameLayout frameLayout)
        {
            isAgreePrivacyPolicy = UserInfo.Current.isAgreePrivacyPolicy;
            var frameRow = new FrameLayout()
            {
                Height = Application.GetRealHeight(28),
                Y = Application.GetRealHeight(628),
            };
            frameLayout.AddChidren(frameRow);
            //同意按钮背景
            var agreeView = new FrameLayout()
            {
                Height = Application.GetRealHeight(28),
                Width = Application.GetRealWidth(28),
                X = Application.GetRealWidth(82),
            };
            frameRow.AddChidren(agreeView);
            //同意图标按钮
            var agreeBtn = new Button()
            {
                Width = Application.GetMinRealAverage(28),
                Height = Application.GetMinRealAverage(28),
                UnSelectedImagePath = "Public/ChooseIcon.png",
                SelectedImagePath = "Public/ChooseOnIcon.png",
                IsSelected = isAgreePrivacyPolicy,
                Gravity = Gravity.Center
            };
            agreeView.AddChidren(agreeBtn);
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                isAgreePrivacyPolicy = !isAgreePrivacyPolicy;
                agreeBtn.IsSelected = isAgreePrivacyPolicy;
                UserInfo.Current.isAgreePrivacyPolicy = isAgreePrivacyPolicy;
                UserInfo.Current.SaveUserInfo();
            };
            agreeBtn.MouseUpEventHandler = eventHandler;
            agreeView.MouseUpEventHandler = eventHandler;
            //int btnWidth = 0;
            //同意文本
            var agreeTextBtn = new TextButton()
            {
                X = agreeView.Right,
                Width = Application.GetRealWidth(28),
                Height = Application.GetRealHeight(28),
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextID = StringId.Agree
            };
            frameRow.AddChidren(agreeTextBtn);
            agreeTextBtn.Width = Utlis.GetRealWidthByTextButton(agreeTextBtn);
            //用户协议按钮
            var userAgreementBtn = new TextButton()
            {
                X = agreeTextBtn.Right,
                Width = Application.GetRealWidth(28),
                Height = Application.GetRealHeight(28),
                TextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = "《" + Language.StringByID(StringId.UserAgreement) + "》"
            };
            frameRow.AddChidren(userAgreementBtn);
            userAgreementBtn.Width = Utlis.GetRealWidthByTextButton(userAgreementBtn);
            //和文本
            var andTextBtn = new TextButton()
            {
                X = userAgreementBtn.Right,
                Width = Application.GetRealWidth(28),
                Height = Application.GetRealHeight(28),
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextID = StringId.And
            };
            frameRow.AddChidren(andTextBtn);
            andTextBtn.Width = Utlis.GetRealWidthByTextButton(andTextBtn);
            //隐私政策按钮
            var privacyPolicyBtn = new TextButton()
            {
                X = andTextBtn.Right,
                Width = Application.GetRealWidth(28),
                Height = Application.GetRealHeight(28),
                TextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = "《" + Language.StringByID(StringId.PrivacyPolicy) + "》"
            };
            frameRow.AddChidren(privacyPolicyBtn);
            privacyPolicyBtn.Width = Utlis.GetRealWidthByTextButton(privacyPolicyBtn);
            //打开用户协议
            userAgreementBtn.MouseUpEventHandler = (sender, e) =>
            {
                OpenWebViewPage(false);
            };
            //打开隐私政策
            privacyPolicyBtn.MouseUpEventHandler = (sender, e) =>
            {
                OpenWebViewPage(true);
            };
        }
        /// <summary>
        /// OpenWebViewPage
        /// </summary>
        /// <param name="isOpenPrivacyPolicy">是否隐私政策</param>
        private void OpenWebViewPage(bool isOpenPrivacyPolicy)
        {
            string url = isAgreePrivacyPolicy ? Constant.URL_PrivacyPolicy : Constant.URL_UserAgreement;
            string titleStr = isAgreePrivacyPolicy ? Language.StringByID(StringId.PrivacyPolicy) : Language.StringByID(StringId.UserAgreement);
            new WebViewDialog().LoadPage(titleStr, url);
        }
        /// <summary>
        /// 检测隐私协议
        /// </summary>
        /// <returns></returns>
        private bool CheckPrivacyPolicy()
        {
            if (isAgreePrivacyPolicy == false)
            {
                //请同意《用户协议》和《隐私政策》
                Utlis.ShowTip(Language.StringByID(StringId.PleaseReadAndAgreePrivacyPolicyMsg));
                return false;
            }
            return true;
        }
        #endregion
    }
}
HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -28,6 +28,25 @@
        }
        /// <summary>
        /// 检测当前配置域名是否一致,不一致则替换
        /// </summary>
        /// <param name="result"></param>
        void CheckAndSetUserRequestHost(ResponsePackNew result)
        {
            try
            {
                var mGlobalRegionListObj = Newtonsoft.Json.JsonConvert.DeserializeObject<GlobalRegionListRes>(result.Data.ToString());
                if (UserInfo.Current.RequestHttpsHost != mGlobalRegionListObj.regionUrl)
                {
                    UserInfo.Current.RequestHttpsHost = mGlobalRegionListObj.regionUrl;
                    UserInfo.Current.GlobalRegion = mGlobalRegionListObj;
                    UserInfo.Current.SaveUserInfo();
                }
            }
            catch { }
        }
        /// <summary>
        /// 点击按钮获取验证码
        /// </summary>
        void GetVerificationCode()
@@ -51,7 +70,7 @@
                        btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
                        return;
                    }
                    if (!Regex.IsMatch(account, @"^[1]+\d{10}") || (account.Length != 11))
                    if (!Utlis.CheckPhoneNumber(phoneNumber, phoneZoneCode))
                    {
                        var tip = new Tip()
                        {
@@ -73,11 +92,14 @@
                        var result = pm.GetRegionByAccount(account);
                        if (result.Code != StateCode.SUCCESS)
                        {
                            IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_GetRegionByAccount, result.Code);
                            IMessageCommon.Current.ShowErrorInfoAlter(result.Code);
                            return;
                        }
                        else
                        {
                            //检测当前配置域名是否一致,不一致则替换
                            CheckAndSetUserRequestHost(result);
                            //
                            Application.RunOnMainThread(() =>
                            {
                                btnGetVerificationCode.IsSelected = false;
@@ -113,7 +135,7 @@
                                    btnPasswordViewBottomLine.Height = Application.GetRealHeight(2);
                                });
                                // 提示错误
                                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Verification_Send, resultObj.Code);
                                IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                            }
                        }
@@ -395,7 +417,7 @@
                        return;
                    if (loginType == 0)
                    {
                        if (!Regex.IsMatch(account, @"^[1]+\d{10}") || (account.Length != 11))
                        if (!Utlis.CheckPhoneNumber(registerPhone, phoneZoneCode))
                        {
                            var tip = new Tip()
                            {
@@ -418,7 +440,7 @@
                    }
                    else
                    {
                        if (!Regex.IsMatch(account, "([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,5})+"))
                        if (!Utlis.CheckEmail(registerEmail))
                        {
                            var tip = new Tip()
                            {
@@ -493,12 +515,15 @@
            {
                if (btnLogin.IsSelected)
                {
                    //判断是否同意了隐私政策
                    if (CheckPrivacyPolicy() == false) return;
                    account = etAccount.Text.Trim();
                    password = etPassword.Text.Trim();
                    if (loginType == 0)
                    {
                        if (!Regex.IsMatch(account, @"^[1]+\d{10}") && account.Length == 11)
                        if (!Utlis.CheckPhoneNumber(account, phoneZoneCode))
                        {
                            var tip = new Tip()
                            {
@@ -512,7 +537,7 @@
                    }
                    else
                    {
                        if (!Regex.IsMatch(account, "([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,5})+"))
                        if (!Utlis.CheckEmail(account))
                        {
                            var tip = new Tip()
                            {
@@ -584,8 +609,13 @@
                        var result = pm.GetRegionByAccount(account);
                        if (result.Code != StateCode.SUCCESS)
                        {
                            IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_GetRegionByAccount, result.Code);
                            IMessageCommon.Current.ShowErrorInfoAlter(result.Code);
                            return;
                        }
                        else
                        {
                            //设置用户所注册地区的域名,用户相关操作都用这个域名
                            CheckAndSetUserRequestHost(result);
                        }
                    }
@@ -627,7 +657,7 @@
                                OnAppConfig.Instance.RefreshUserConfig();
                                DB_ResidenceData.InitRoomFunction();
                            }
                            if (MainPage.LoginUser.userEmailInfo == "464027401@qq.com")
                            if ( UserInfo.Current.userEmailInfo == "464027401@qq.com")
                            {
                                DB_ResidenceData.residenceData.floors.Add(new Floor() { name = "1F", sid = "09888" });
                                var r111 = new Room() { sid = "0001", name = "Room-1", floorId = "09888", backgroundImage = "Classification/Room/Roombg.png" };
@@ -901,7 +931,11 @@
                        else
                        {
                            //2020-11-13 待确认
                            MainPage.ShowAlertOnMainThread("登录失败,请先添加住宅。");
                            //获取住宅失败,重新标记为未登录状态
                             UserInfo.Current.lastTime = DateTime.MinValue;
                             UserInfo.Current.SaveUserInfo();
                            //登录失败,请先添加住宅!
                            Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.FailedGetHomeList));
                        }
                    }
                }
@@ -945,18 +979,26 @@
            if (loginResult.Code == StateCode.SUCCESS)
            {
                var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserLoginRes>(loginResult.Data.ToString());
                MainPage.LoginUser = new UserInfo
                {
                    userType = revertData.userType,
                    accountString = account,
                    password = password,
                    lastTime = DateTime.Now,
                    ID = revertData.userId,
                    loginTokenString = revertData.headerPrefix + revertData.accessToken,
                    refreshToken = revertData.refreshToken,
                    userName = revertData.name
                };
                MainPage.LoginUser.SaveUserInfo();
                // UserInfo.Current = new UserInfo
                //{
                //    userType = revertData.userType,
                //    accountString = account,
                //    password = password,
                //    lastTime = DateTime.Now,
                //    ID = revertData.userId,
                //    loginTokenString = revertData.headerPrefix + revertData.accessToken,
                //    refreshToken = revertData.refreshToken,
                //    userName = revertData.name
                //};
                UserInfo.Current.userType = revertData.userType;
                UserInfo.Current.accountString = account;
                //UserInfo.Current.password = password;
                UserInfo.Current.lastTime = DateTime.Now;
                UserInfo.Current.ID = revertData.userId;
                UserInfo.Current.loginTokenString = revertData.headerPrefix + revertData.accessToken;
                UserInfo.Current.refreshToken = revertData.refreshToken;
                UserInfo.Current.userName = revertData.name;
                UserInfo.Current.SaveUserInfo();
                MainPage.Log("登录成功。");
                result = true;
                //获取用户信息
@@ -1031,7 +1073,7 @@
            if (responsePack == StateCode.SUCCESS)
            {
                //2020-11-13 待确认,没有住宅,不算登录成功
                if (MainPage.LoginUser.regionList != null && MainPage.LoginUser.regionList.Count > 0){
                if ( UserInfo.Current.regionList != null &&  UserInfo.Current.regionList.Count > 0){
                    result = true;
                }
                //result = true;
@@ -1039,7 +1081,7 @@
            else
            {
                // 提示错误
                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Gethomepager, responsePack);
                IMessageCommon.Current.ShowErrorInfoAlter(responsePack);
            }
            return result;
        }
HDL_ON/UI/UI1-Login/RegisterPage.cs
@@ -283,6 +283,7 @@
                TextSize = CSS_FontSize.TextFontSize,
                PlaceholderTextColor = CSS_Color.PromptingColor1,
                PlaceholderText = Language.StringByID(StringId.PlsEntryPhoneNumber),
                IsNumberKeyboardType = true
            };
            accountView.AddChidren(etAccount);
@@ -680,25 +681,34 @@
            if (loginResult.Code == StateCode.SUCCESS)
            {
                var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserLoginRes>(loginResult.Data.ToString());
                MainPage.LoginUser = new UserInfo
                {
                    userType = revertData.userType,
                    accountString = account,
                    password = password,
                    lastTime = DateTime.Now,
                    ID = revertData.userId,
                    loginTokenString = revertData.headerPrefix + revertData.accessToken,
                    refreshToken = revertData.refreshToken,
                    userName = revertData.name
                };
                MainPage.LoginUser.SaveUserInfo();
                // UserInfo.Current = new UserInfo
                //{
                //    userType = revertData.userType,
                //    accountString = account,
                //    password = password,
                //    lastTime = DateTime.Now,
                //    ID = revertData.userId,
                //    loginTokenString = revertData.headerPrefix + revertData.accessToken,
                //    refreshToken = revertData.refreshToken,
                //    userName = revertData.name
                //};
                UserInfo.Current.userType = revertData.userType;
                UserInfo.Current.accountString = account;
                //UserInfo.Current.password = password;
                UserInfo.Current.lastTime = DateTime.Now;
                UserInfo.Current.ID = revertData.userId;
                UserInfo.Current.loginTokenString = revertData.headerPrefix + revertData.accessToken;
                UserInfo.Current.refreshToken = revertData.refreshToken;
                UserInfo.Current.userName = revertData.name;
                UserInfo.Current.SaveUserInfo();
                MainPage.Log("登录成功。");
                result = true;
            }
            else
            {
                //登录失败
                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Login, loginResult.Code);
                IMessageCommon.Current.ShowErrorInfoAlter(loginResult.Code);
                Application.RunOnMainThread(() =>
                {
                    btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
@@ -30,11 +30,11 @@
        {
            etAccount.TextChangeEventHandler = (sender, e) =>
            {
                Regex reg = new Regex(@"^[1]+\d{10}");
                var mFalg = reg.Match(etAccount.Text.Trim());
                //Regex reg = new Regex(@"^[1]+\d{10}");
                //var mFalg = reg.Match(etAccount.Text.Trim());
                if (registerType == 0)//手机注册获取验证码按钮生效条件
                {
                    if (btnGlobalRoaming.Text == "+86" && etAccount.Text.Trim().Length != 11)
                    if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode))
                    {
                        btnGetVerificationCode_Phone.IsSelected = false;
                    }
@@ -46,7 +46,7 @@
                }
                else//邮箱注册获取验证码按钮生效条件
                {
                    if (!mFalg.Success)
                    if (!Utlis.CheckEmail(etAccount.Text.Trim()))
                    {
                        btnGetVerificationCode_Mail.IsSelected = false;
                    }
@@ -72,6 +72,7 @@
                {
                    return;
                }
                etAccount.IsNumberKeyboardType = true;
                etAccount.Text = registerPhone;
                etPassword.Text = "";
                etRepeatPassword.Text = "";
@@ -100,6 +101,8 @@
            {
                if (registerType == 1)
                    return;
                etAccount.IsNumberKeyboardType = false;
                etAccount.Text = registerEmail;
                etPassword.Text = "";
                etRepeatPassword.Text = "";
@@ -148,9 +151,7 @@
                    {
                        if (registerType == 0)
                        {
                            Regex reg = new Regex(@"^[1]+\d{10}");
                            var mFalg = reg.Match(etAccount.Text.Trim());
                            if (!mFalg.Success || (btnGlobalRoaming.Text == "+86" && etAccount.Text.Trim().Length != 11))
                            if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode))
                            {
                                btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
                                btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
@@ -179,10 +180,7 @@
                        else if (registerType == 1)
                        {
                            //邮箱注册-验证邮箱是否正确
                            var reg = new Regex("^\\s*([A-Za-z0-9_-]+(\\.\\w+)*@(\\w+\\.)+\\w{2,5})\\s*$");
                            //Regex.IsMatch(etAccount.Text.Trim(), "([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,5})+");
                            var mFalg = reg.Match(etAccount.Text.Trim());
                            if (!mFalg.Success)
                            if (!Utlis.CheckEmail(etAccount.Text.Trim()))
                            {
                                btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
                                btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
@@ -420,17 +418,17 @@
                            if (resultObj.Code != StateCode.SUCCESS)
                            {
                                // 提示错误
                                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Verification_Send, resultObj.Code);
                                IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                            }
                        }else if (result.Code.ToUpper() == StateCode.SUCCESS)
                        {
                            //3.提示账号已存在,无法重复注册
                            MainPage.ShowAlertOnMainThread(Language.StringByID(StringId.AccountAlreadyUse));
                            Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.AccountAlreadyUse));
                        } else
                        {
                            //4.提示其它异常错误
                            IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_GetRegionByAccount, result.Code);
                            IMessageCommon.Current.ShowErrorInfoAlter(result.Code);
                        }
                    })
                    { IsBackground = true }.Start();
@@ -540,7 +538,7 @@
                    else// 注册失败
                    {
                        // 提示错误
                        IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Member_Register, validateSmsResult.Code);
                        IMessageCommon.Current.ShowErrorInfoAlter(validateSmsResult.Code);
                        //2020-11-13 待修改
                        //string erorrInfo = "";
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/AccountBindInfoPage.cs
@@ -4,6 +4,9 @@
namespace HDL_ON.UI
{
    /// <summary>
    /// 已绑定手机或者邮箱的页面
    /// </summary>
    public partial class AccountBindInfoPage : FrameLayout
    {
        FrameLayout bodyView;
@@ -60,7 +63,7 @@
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.CenterRight,
                Text = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo,
                Text = optionType == 1 ?  UserInfo.Current.userEmailInfo :  UserInfo.Current.userMobileInfo,
            };
            rowView.AddChidren(btnContent);
@@ -82,7 +85,8 @@
            };
            bodyView.AddChidren(btnChangeBind);
            if( (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) && optionType == 1) || (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) && optionType == 2))
            //同时绑定邮箱或者手机才显示"更换验证方式"
            if (!string.IsNullOrEmpty( UserInfo.Current.userMobileInfo) && !string.IsNullOrEmpty( UserInfo.Current.userEmailInfo))
            {
                Button btnUnbind = new Button()
                {
@@ -111,16 +115,18 @@
        /// </summary>
        void LoadEvent_SkipChangeBandAccountInfo(Button button)
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var cbe = new ChangeBindAccountPage();
                cbe.isUnbind = false;
                MainPage.BasePageView.AddChidren(cbe);
                if (optionType == 1)
                {
                    cbe.LoadPage(action, optionType, StringId.ModifyBindingEmail, StringId.CurrentEmail);
                    cbe.LoadPage(action, optionType, StringId.ModifyBindingEmail);
                }
                else if(optionType == 2)
                {
                    cbe.LoadPage(action, optionType, StringId.ModifyBindingPhone, StringId.CurPhone);
                    cbe.LoadPage(action, optionType, StringId.ModifyBindingPhone);
                }
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
@@ -132,16 +138,18 @@
        /// </summary>
        void LoadEvent_SkipDelBandAccountInfo(Button button)
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var cbe = new ChangeBindAccountPage();
                cbe.isUnbind = true;//是否为解绑标记
                MainPage.BasePageView.AddChidren(cbe);
                if (optionType == 1)
                {
                    cbe.LoadPage(action, optionType, StringId.UnbindEmail, StringId.CurrentEmail);
                    cbe.LoadPage(action, optionType, StringId.UnbindEmail);
                }
                else if(optionType == 2)
                {
                    cbe.LoadPage(action, optionType, StringId.UnbindPhone, StringId.CurPhone);
                    cbe.LoadPage(action, optionType, StringId.UnbindPhone);
                }
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/BindAccountPage.cs
@@ -1,206 +1,206 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
using System.Text.RegularExpressions;
using HDL_ON.DAL.Server;
//using System;
//using Shared;
//using HDL_ON.UI.CSS;
//using System.Text.RegularExpressions;
//using HDL_ON.DAL.Server;
namespace HDL_ON.UI
{
    public partial class BindAccountPage : FrameLayout
    {
        FrameLayout bodyView;
        Button btnBind;
        EditText etContent;
        Action<string> action;
        /// <summary>
        /// 标题ID
        /// </summary>
        int titleId;
        public BindAccountPage()
        {
            bodyView = this;
        }
//namespace HDL_ON.UI
//{
//    public partial class BindAccountPage : FrameLayout
//    {
//        FrameLayout bodyView;
//        Button btnBind;
//        EditText etContent;
//        Action<string> action;
//        /// <summary>
//        /// 标题ID
//        /// </summary>
//        int titleId;
//        public BindAccountPage()
//        {
//            bodyView = this;
//        }
        public void LoadPage(Action<string> act,int tId)
        {
            action = act;
            titleId = tId;
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
//        public void LoadPage(Action<string> act,int tId)
//        {
//            action = act;
//            titleId = tId;
//            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
//            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
            FrameLayout rowView = new FrameLayout()
            {
                Y = Application.GetRealHeight(72),
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(rowView);
//            FrameLayout rowView = new FrameLayout()
//            {
//                Y = Application.GetRealHeight(72),
//                Height = Application.GetRealHeight(50),
//                BackgroundColor = CSS_Color.MainBackgroundColor,
//            };
//            bodyView.AddChidren(rowView);
            Button btnTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(180),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = titleId == StringId.BindEmail ? StringId.EntryNewEmail : StringId.EntryNewPhone,
            };
            rowView.AddChidren(btnTitle);
//            Button btnTitle = new Button()
//            {
//                X = Application.GetRealWidth(16),
//                Width = Application.GetRealWidth(180),
//                TextColor = CSS_Color.FirstLevelTitleColor,
//                TextSize = CSS_FontSize.SubheadingFontSize,
//                TextAlignment = TextAlignment.CenterLeft,
//                TextID = titleId == StringId.BindEmail ? StringId.EntryNewEmail : StringId.EntryNewPhone,
//            };
//            rowView.AddChidren(btnTitle);
            etContent = new EditText()
            {
                Width = Application.GetRealWidth(359),
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.CenterRight,
                Foucs = true
            };
            rowView.AddChidren(etContent);
//            etContent = new EditText()
//            {
//                Width = Application.GetRealWidth(359),
//                TextColor = CSS_Color.PromptingColor1,
//                TextSize = CSS_FontSize.TextFontSize,
//                TextAlignment = TextAlignment.CenterRight,
//                Foucs = true
//            };
//            rowView.AddChidren(etContent);
            btnBind = new Button()
            {
                Y = Application.GetRealHeight(213),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(44),
                BackgroundColor = CSS_Color.MainColor,
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.MainBackgroundColor,
                TextID = StringId.Confirm,
                TextSize = CSS_FontSize.SubheadingFontSize,
                IsBold = true,
                Radius = (uint)Application.GetRealWidth(22),
                BorderColor = 0x00000000,
                BorderWidth = 0,
            };
            bodyView.AddChidren(btnBind);
//            btnBind = new Button()
//            {
//                Y = Application.GetRealHeight(213),
//                Gravity = Gravity.CenterHorizontal,
//                Width = Application.GetRealWidth(220),
//                Height = Application.GetRealHeight(44),
//                BackgroundColor = CSS_Color.MainColor,
//                TextAlignment = TextAlignment.Center,
//                TextColor = CSS_Color.MainBackgroundColor,
//                TextID = StringId.Confirm,
//                TextSize = CSS_FontSize.SubheadingFontSize,
//                IsBold = true,
//                Radius = (uint)Application.GetRealWidth(22),
//                BorderColor = 0x00000000,
//                BorderWidth = 0,
//            };
//            bodyView.AddChidren(btnBind);
            LoadEvent_BindEmail();
//            LoadEvent_BindEmail();
           
        }
    }
//        }
//    }
    //--------------------------------------------
    public partial class BindAccountPage
    {
        void LoadEvent_BindEmail()
        {
            btnBind.MouseUpEventHandler = (sender, e) => {
                Application.HideSoftInput();
                var account = etContent.Text.Trim();
                if (titleId == StringId.BindEmail)
                {
                    if (account == MainPage.LoginUser.userEmailInfo)
                    {
                        var tip = new Tip()
                        {
                            Text = Language.StringByID(StringId.EmailIsSameNoNeedModfiy),
                            CloseTime = 1,
                            Direction = AMPopTipDirection.None
                        };
                        tip.Show(bodyView);
                        return;
                    }
                    if (!Regex.IsMatch(account, "([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,5})+"))
                    {
                        var tip = new Tip()
                        {
                            Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
                            CloseTime = 1,
                            Direction = AMPopTipDirection.None
                        };
                        tip.Show(bodyView);
                        return;
                    }
                }
                else if (titleId == StringId.BindPhone)
                {
                    if(account == MainPage.LoginUser.userMobileInfo)
                    {
                        var tip = new Tip()
                        {
                            Text = Language.StringByID(StringId.PhoneNumberIsSameNoNeedModfiy),
                            CloseTime = 1,
                            Direction = AMPopTipDirection.None
                        };
                        tip.Show(bodyView);
                        return;
                    }
                    if (!Regex.IsMatch(account, @"^[1]+\d{10}") || (account.Length != 11))
                    {
                        var tip = new Tip()
                        {
                            Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
                            CloseTime = 1,
                            Direction = AMPopTipDirection.None
                        };
                        tip.Show(bodyView);
                        return;
                    }
                }
                new System.Threading.Thread(() =>
                {
                    var result = new HttpServerRequest().BindAccount(account);
                    if (result.ToUpper() == StateCode.SUCCESS)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            if (titleId == StringId.BindEmail)
                            {
                                MainPage.LoginUser.userEmailInfo = account;
                            }
                            else if (titleId == StringId.BindPhone)
                            {
                                MainPage.LoginUser.userMobileInfo = account;
                            }
                            var page = new OperationResultDisPalyPage();
                            page.Show();
                            if (titleId == StringId.BindEmail)
                            {
                                page.LoadPage(true, Language.StringByID(StringId.BindEmail), Language.StringByID(StringId.BindEmailSuccess), "");
                            }
                            else if (titleId == StringId.BindPhone)
                            {
                                page.LoadPage(true, Language.StringByID(StringId.BindPhone), Language.StringByID(StringId.BindPhoneSuccess), "");
                            }
//    //--------------------------------------------
//    public partial class BindAccountPage
//    {
//        void LoadEvent_BindEmail()
//        {
//            btnBind.MouseUpEventHandler = (sender, e) => {
//                Application.HideSoftInput();
//                var account = etContent.Text.Trim();
//                if (titleId == StringId.BindEmail)
//                {
//                    if (account ==  UserInfo.Current.userEmailInfo)
//                    {
//                        var tip = new Tip()
//                        {
//                            Text = Language.StringByID(StringId.EmailIsSameNoNeedModfiy),
//                            CloseTime = 1,
//                            Direction = AMPopTipDirection.None
//                        };
//                        tip.Show(bodyView);
//                        return;
//                    }
//                    if (!Regex.IsMatch(account, "([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,5})+"))
//                    {
//                        var tip = new Tip()
//                        {
//                            Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
//                            CloseTime = 1,
//                            Direction = AMPopTipDirection.None
//                        };
//                        tip.Show(bodyView);
//                        return;
//                    }
//                }
//                else if (titleId == StringId.BindPhone)
//                {
//                    if(account ==  UserInfo.Current.userMobileInfo)
//                    {
//                        var tip = new Tip()
//                        {
//                            Text = Language.StringByID(StringId.PhoneNumberIsSameNoNeedModfiy),
//                            CloseTime = 1,
//                            Direction = AMPopTipDirection.None
//                        };
//                        tip.Show(bodyView);
//                        return;
//                    }
//                    if (!Regex.IsMatch(account, @"^[1]+\d{10}") || (account.Length != 11))
//                    {
//                        var tip = new Tip()
//                        {
//                            Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
//                            CloseTime = 1,
//                            Direction = AMPopTipDirection.None
//                        };
//                        tip.Show(bodyView);
//                        return;
//                    }
//                }
//                new System.Threading.Thread(() =>
//                {
//                    var result = new HttpServerRequest().BindAccount(account);
//                    if (result.ToUpper() == StateCode.SUCCESS)
//                    {
//                        Application.RunOnMainThread(() =>
//                        {
//                            if (titleId == StringId.BindEmail)
//                            {
//                                 UserInfo.Current.userEmailInfo = account;
//                            }
//                            else if (titleId == StringId.BindPhone)
//                            {
//                                 UserInfo.Current.userMobileInfo = account;
//                            }
//                            var page = new OperationResultDisPalyPage();
//                            page.Show();
//                            if (titleId == StringId.BindEmail)
//                            {
//                                page.LoadPage(true, Language.StringByID(StringId.BindEmail), Language.StringByID(StringId.BindEmailSuccess), "");
//                            }
//                            else if (titleId == StringId.BindPhone)
//                            {
//                                page.LoadPage(true, Language.StringByID(StringId.BindPhone), Language.StringByID(StringId.BindPhoneSuccess), "");
//                            }
                            for (int i = 0; i < 3; i++)
                            {
                                MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
                            }
                            action(account);
                        });
                    }
                    else
                    {
                        var tipMsg = "";
//                            for (int i = 0; i < 3; i++)
//                            {
//                                MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
//                            }
//                            action(account);
//                        });
//                    }
//                    else
//                    {
//                        var tipMsg = "";
                       
                        Application.RunOnMainThread(() =>
                        {
                            var page = new OperationResultDisPalyPage();
                            page.Show();
                            if (titleId == StringId.BindEmail)
                            {
                                if (result == "Exist")
                                {
                                    tipMsg = Language.StringByID(StringId.EmailAlreadyUse);
                                }
                                page.LoadPage(false, Language.StringByID(StringId.BindEmail), Language.StringByID(StringId.BindEmailFail) + "," + tipMsg, "");
                            }
                            else
                            {
                                if (result == "Exist")
                                {
                                    tipMsg = Language.StringByID(StringId.PhoneNumberAlreadyUse);
                                }
                                page.LoadPage(false, Language.StringByID(StringId.BindPhone), Language.StringByID(StringId.BindPhoneFail) + "," + tipMsg, "");
                            }
                        });
                    }
                })
                { IsBackground = true }.Start();
            };
        }
    }
}
//                        Application.RunOnMainThread(() =>
//                        {
//                            var page = new OperationResultDisPalyPage();
//                            page.Show();
//                            if (titleId == StringId.BindEmail)
//                            {
//                                if (result == "Exist")
//                                {
//                                    tipMsg = Language.StringByID(StringId.EmailAlreadyUse);
//                                }
//                                page.LoadPage(false, Language.StringByID(StringId.BindEmail), Language.StringByID(StringId.BindEmailFail) + "," + tipMsg, "");
//                            }
//                            else
//                            {
//                                if (result == "Exist")
//                                {
//                                    tipMsg = Language.StringByID(StringId.PhoneNumberAlreadyUse);
//                                }
//                                page.LoadPage(false, Language.StringByID(StringId.BindPhone), Language.StringByID(StringId.BindPhoneFail) + "," + tipMsg, "");
//                            }
//                        });
//                    }
//                })
//                { IsBackground = true }.Start();
//            };
//        }
//    }
//}
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs
@@ -6,14 +6,40 @@
namespace HDL_ON.UI
{
    /// <summary>
    /// 修改绑定或者解绑--发送验证码页面
    /// </summary>
    public partial class ChangeBindAccountPage : FrameLayout
    {
        /// <summary>
        ///
        /// </summary>
        FrameLayout bodyView;
        /// <summary>
        ///
        /// </summary>
        Action<string> action;
        /// <summary>
        /// 操作目标类型 1:邮箱,2:手机
        /// </summary>
        int optionType;
        /// <summary>
        /// 是否为解绑验证
        /// </summary>
        public bool isUnbind;
        /// <summary>
        ///
        /// </summary>
        Button btnTitle;
        /// <summary>
        ///
        /// </summary>
        Button btnContent;
        /// <summary>
        /// ChangeBindAccountPage
        /// </summary>
        public ChangeBindAccountPage()
        {
            bodyView = this;
@@ -25,18 +51,18 @@
        /// <param name="optionType">操作目标类型 1:邮箱,2:手机</param>
        /// <param name="titleId"></param>
        /// <param name="contentTitleId"></param>
        public void LoadPage(Action<string> act, int opt, int titleId, int contentTitleId)
        public void LoadPage(Action<string> act, int opt, int titleId)
        {
            action = act;
            optionType = opt;
            string account;
            if (optionType == 0)
            {
                account = MainPage.LoginUser.userEmailInfo;
                account =  UserInfo.Current.userEmailInfo;
            }
            else
            {
                account = MainPage.LoginUser.userMobileInfo;
                account =  UserInfo.Current.userMobileInfo;
            }
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
@@ -49,24 +75,24 @@
            };
            bodyView.AddChidren(rowView);
            Button btnTitle = new Button()
            btnTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(180),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = contentTitleId,
                //TextID = contentTitleId,
            };
            rowView.AddChidren(btnTitle);
            Button btnContent = new Button()
            btnContent = new Button()
            {
                Width = Application.GetRealWidth(359),
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.CenterRight,
                Text = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo,
                //Text = optionType == 1 ?  UserInfo.Current.userEmailInfo :  UserInfo.Current.userMobileInfo,
            };
            rowView.AddChidren(btnContent);
@@ -88,7 +114,10 @@
            };
            bodyView.AddChidren(btnChangeBind);
            if (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo))
            //同时绑定邮箱或者手机才显示"更换验证方式"
            if (!string.IsNullOrEmpty( UserInfo.Current.userMobileInfo) && !string.IsNullOrEmpty( UserInfo.Current.userEmailInfo))
            {
                Button btnChangeGetVer = new Button()
                {
@@ -106,7 +135,27 @@
                LoadEvent_ChangeVerificationMethod(btnChangeGetVer, btnTitle, btnContent);
            }
            SetContentTitleId();
            LoadEvent_GetVerification(btnChangeBind, titleId);
        }
        /// <summary>
        /// 设置按钮提示文字
        /// 修改绑定时提示:手机验证、邮箱验证
        /// 解绑时提示:当前手机手机号码、当前邮箱地址
        /// </summary>
        void SetContentTitleId()
        {
            if (optionType == 2)
            {
                btnTitle.TextID = isUnbind ? StringId.CurPhone : StringId.PhoneNumberVerification;
                btnContent.Text =  UserInfo.Current.userMobileInfo;
            }
            else
            {
                btnTitle.TextID = isUnbind ? StringId.CurrentEmail : StringId.EmailVerification;
                btnContent.Text =  UserInfo.Current.userEmailInfo;
            }
        }
    }
@@ -121,16 +170,7 @@
            btn.MouseUpEventHandler = (sender, e) =>
            {
                optionType = optionType == 1 ? 2 : 1;
                if (optionType == 2)
                {
                    btnTitle.TextID = StringId.CurPhone;
                    btnContent.Text = MainPage.LoginUser.userMobileInfo;
                }
                else
                {
                    btnTitle.TextID = StringId.CurrentEmail;
                    btnContent.Text = MainPage.LoginUser.userEmailInfo;
                }
                SetContentTitleId();
            };
        }
@@ -146,18 +186,24 @@
                {
                    new Thread(() =>
                    {
                        if (optionType == 1)
                        //1.获取验证码,采用敏感数据验证
                        ResponsePackNew resultObj;
                        if (optionType == 1)//邮箱
                        {
                            var resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, MainPage.LoginUser.userEmailInfo);
                            resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.SENSITIVE_DATA,  UserInfo.Current.userEmailInfo);
                        }
                        else
                        {
                            resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.SENSITIVE_DATA,  UserInfo.Current.userMobileInfo, true,  UserInfo.Current.areaCode);
                        }
                        }
                        else if (optionType == 2)
                        if (resultObj.Code != StateCode.SUCCESS)
                        {
                            var resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, MainPage.LoginUser.userMobileInfo, true, MainPage.LoginUser.areaCode.ToString());
                            // 提示错误
                            IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                        }
                    })
                    { IsBackground = true }.Start();
                }
                        else
                        {
                if (time == 0)
                {
                    time = 60;
@@ -182,11 +228,22 @@
                    })
                    { IsBackground = true }.Start();
                }
                            Application.RunOnMainThread(() =>
                            {
                button.BackgroundColor = CSS_Color.PromptingColor1;
                var vcp = new VerificationCodePage();
                                var vcp = new ChangeBindVerificationCodePage();
                                vcp.isUnbind = isUnbind;
                MainPage.BasePageView.AddChidren(vcp);
                vcp.LoadPage(action, titleId, optionType, time);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                            });
                        }
                    })
                    { IsBackground = true }.Start();
                }
            };
        }
    }
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindVerificationCodePage.cs
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs
New file
@@ -0,0 +1,225 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
using System.Threading;
using System.Text.RegularExpressions;
using HDL_ON.DAL.Server;
namespace HDL_ON.UI
{
    /// <summary>
    ///  新绑定或者换绑--手机或者邮箱发送验证码
    /// </summary>
    public partial class NewBindAccountPage : FrameLayout
    {
        FrameLayout bodyView;
        Button btnBind;
        EditText etContent;
        Action<string> action;
        /// <summary>
        /// 标题ID
        /// </summary>
        int titleId;
        /// <summary>
        /// 是否手机
        /// </summary>
        bool isPhone;
        /// <summary>
        /// 是否换绑
        /// </summary>
        bool isModifyBind;
        /// <summary>
        /// 手机区号
        /// </summary>
        string phoneZoneCode = "86";
        /// <summary>
        ///
        /// </summary>
        public NewBindAccountPage()
        {
            bodyView = this;
        }
        /// <summary>
        /// LoadPage
        /// </summary>
        /// <param name="act"></param>
        /// <param name="isPhone">是否绑定手机</param>
        public void LoadPage(Action<string> act, bool isPhone = false, bool isModifyBind = false)
        {
            action = act;
            this.isPhone = isPhone;
            this.isModifyBind = isModifyBind;
            if (isModifyBind)
            {
                //修改绑定
                titleId = isPhone ? StringId.ModifyBindingPhone : StringId.ModifyBindingEmail;
            }
            else
            {
                //新绑定
                titleId = isPhone ? StringId.BoundMobileInfo : StringId.BoundEmailInfo;
            }
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
            FrameLayout rowView = new FrameLayout()
            {
                Y = Application.GetRealHeight(72),
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(rowView);
            //绑定邮箱或者绑定手机号
            Button btnTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(180),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = titleId,
            };
            rowView.AddChidren(btnTitle);
            etContent = new EditText()
            {
                Width = Application.GetRealWidth(359),
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.CenterRight,
                Foucs = true
            };
            rowView.AddChidren(etContent);
            btnBind = new Button()
            {
                Y = Application.GetRealHeight(213),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(44),
                BackgroundColor = CSS_Color.MainColor,
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.MainBackgroundColor,
                TextID = StringId.GetVerificationCode,
                TextSize = CSS_FontSize.SubheadingFontSize,
                IsBold = true,
                Radius = (uint)Application.GetRealWidth(22),
                BorderColor = 0x00000000,
                BorderWidth = 0,
            };
            bodyView.AddChidren(btnBind);
            //点击获取验证码
            LoadEvent_GetVerification(btnBind);
        }
    }
    //--------------------------------------------
    public partial class NewBindAccountPage
    {
        /// <summary>
        /// 点击获取验证码
        /// </summary>
        void LoadEvent_GetVerification(Button button)
        {
            button.MouseUpEventHandler = (sender, e) =>
            {
                if (button.Text == Language.StringByID(StringId.GetVerificationCode))
                {
                    Application.HideSoftInput();
                    var account = etContent.Text.Trim();
                    #region 正则表达式
                    //1.检测账号是否合法
                    if (!isPhone)
                    {
                        if (!Utlis.CheckEmail(account))
                        {
                            Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectEmailAddress));
                            return;
                        }
                    }
                    else
                    {
                        if (!Utlis.CheckPhoneNumber(account, phoneZoneCode))
                        {
                            Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectMobilNeumber));
                            return;
                        }
                    }
                    #endregion
                    int time = 0;
                    //2.检验通过
                    new Thread(() =>
                    {
                        //2.2  获取验证码
                        ResponsePackNew resultObj;
                        if (!isPhone)//邮箱
                        {
                            resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account);
                        }
                        else
                        {
                            resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account, true, phoneZoneCode);
                        }
                        if (resultObj.Code != StateCode.SUCCESS)
                        {
                            // 提示错误
                            IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                        }
                        else
                        {
                            if (time == 0)
                            {
                                time = 60;
                                new Thread(() =>
                                {
                                    while (time > 0)
                                    {
                                        time--;
                                        Application.RunOnMainThread(() =>
                                        {
                                            button.Text = time.ToString() + "s";
                                        });
                                        Thread.Sleep(1000);
                                    }
                                    Application.RunOnMainThread(() =>
                                    {
                                        button.IsSelected = true;
                                        button.TextID = StringId.GetVerificationCode;
                                        button.BackgroundColor = CSS_Color.MainColor;
                                        time = 0;
                                    });
                                })
                                { IsBackground = true }.Start();
                            }
                            Application.RunOnMainThread(() =>
                            {
                                button.BackgroundColor = CSS_Color.PromptingColor1;
                                var vcp = new NewBindVerificationCodePage();
                                vcp.phoneZoneCode = phoneZoneCode;
                                MainPage.BasePageView.AddChidren(vcp);
                                vcp.LoadPage(action, titleId, account, isPhone, time, isModifyBind);
                                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                            });
                        }
                    })
                    { IsBackground = true }.Start();
                }
            };
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindVerificationCodePage.cs
New file
@@ -0,0 +1,711 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
using System.Threading;
using HDL_ON.DAL.Server;
namespace HDL_ON.UI
{
    /// <summary>
    /// 新绑定或者换绑--验证码验证并绑定
    /// </summary>
    public partial class NewBindVerificationCodePage : FrameLayout
    {
        FrameLayout bodyView;
        Button btnNum1;
        Button btnNum1Line;
        Button btnNum2;
        Button btnNum2Line;
        Button btnNum3;
        Button btnNum3Line;
        Button btnNum4;
        Button btnNum4Line;
        Button btnNum5;
        Button btnNum5Line;
        Button btnNum6;
        Button btnNum6Line;
        EditText et;
        Button btnResend;
        Button btnTip;
        Action<string> action;
        int titleId;
        ///// <summary>
        ///// 操作目标类型 1:邮箱,2:手机
        ///// </summary>
        //int optionType;
        /// <summary>
        /// 倒计时时间
        /// </summary>
        int time = 0;
        /// <summary>
        /// 是否手机
        /// </summary>
        public bool isPhone;
        /// <summary>
        /// 是否换绑
        /// </summary>
        public bool isModifyBind;
        /// <summary>
        /// 新绑定的账号
        /// </summary>
        public string verAccount;
        /// <summary>
        /// 手机区号
        /// </summary>
        public string phoneZoneCode = "86";
        public NewBindVerificationCodePage()
        {
            bodyView = this;
        }
        /// </summary>
        /// <param name="act">回掉函数</param>
        /// <param name="tId">页面标题</param>
        /// <param name="account">账号</param>
        /// <param name="bPhone">是否手机</param>
        /// <param name="t">倒计时时间</param>
        /// <param name="isModifyBind">是否为修改绑定</param>
        public void LoadPage(Action<string> act, int tId, string account, bool bPhone, int t,  bool isModifyBind)
        {
            action = act;
            titleId = tId;
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            isPhone = bPhone;
            time = t;
            this.verAccount = account;
            this.isModifyBind = isModifyBind;
            Action backAction = () => {
                Application.HideSoftInput();
                BackConfirmAction();
            };
            new TopViewDiv(bodyView, Language.StringByID(tId), false).LoadTopView(backAction);
            btnTip = new Button()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(84),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.Center,
                TextID = StringId.VerificationCodePrompt,
            };
            bodyView.AddChidren(btnTip);
            btnNum1 = new Button()
            {
                X = Application.GetRealWidth(24),
                Y = Application.GetRealHeight(156),
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(38),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
            };
            bodyView.AddChidren(btnNum1);
            btnNum1Line = new Button()
            {
                X = Application.GetRealWidth(24),
                Y = btnNum1.Bottom,
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(2),
                BackgroundColor = CSS_Color.PromptingColor2,
                SelectedBackgroundColor = CSS_Color.MainColor,
                IsSelected = true
            };
            bodyView.AddChidren(btnNum1Line);
            btnNum2 = new Button()
            {
                X = Application.GetRealWidth(80),
                Y = Application.GetRealHeight(156),
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(38),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
            };
            bodyView.AddChidren(btnNum2);
            btnNum2Line = new Button()
            {
                X = Application.GetRealWidth(80),
                Y = btnNum2.Bottom,
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.PromptingColor2,
                SelectedBackgroundColor = CSS_Color.MainColor,
            };
            bodyView.AddChidren(btnNum2Line);
            btnNum3 = new Button()
            {
                X = Application.GetRealWidth(136),
                Y = Application.GetRealHeight(156),
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(38),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
            };
            bodyView.AddChidren(btnNum3);
            btnNum3Line = new Button()
            {
                X = Application.GetRealWidth(136),
                Y = btnNum3.Bottom,
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.PromptingColor2,
                SelectedBackgroundColor = CSS_Color.MainColor,
            };
            bodyView.AddChidren(btnNum3Line);
            btnNum4 = new Button()
            {
                X = Application.GetRealWidth(192),
                Y = Application.GetRealHeight(156),
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(38),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
            };
            bodyView.AddChidren(btnNum4);
            btnNum4Line = new Button()
            {
                X = Application.GetRealWidth(192),
                Y = btnNum4.Bottom,
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.PromptingColor2,
                SelectedBackgroundColor = CSS_Color.MainColor,
            };
            bodyView.AddChidren(btnNum4Line);
            btnNum5 = new Button()
            {
                X = Application.GetRealWidth(248),
                Y = Application.GetRealHeight(156),
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(38),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
            };
            bodyView.AddChidren(btnNum5);
            btnNum5Line = new Button()
            {
                X = Application.GetRealWidth(248),
                Y = btnNum5.Bottom,
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.PromptingColor2,
                SelectedBackgroundColor = CSS_Color.MainColor,
            };
            bodyView.AddChidren(btnNum5Line);
            btnNum6 = new Button()
            {
                X = Application.GetRealWidth(304),
                Y = Application.GetRealHeight(156),
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(38),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
            };
            bodyView.AddChidren(btnNum6);
            btnNum6Line = new Button()
            {
                X = Application.GetRealWidth(304),
                Y = btnNum6.Bottom,
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.PromptingColor2,
                SelectedBackgroundColor = CSS_Color.MainColor,
            };
            bodyView.AddChidren(btnNum6Line);
            et = new EditText()
            {
                Y = Application.GetRealHeight(276),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealHeight(10),
                IsNumberKeyboardType = true,
                Foucs = true,
            };
            bodyView.AddChidren(et);
            btnResend = new Button()
            {
                Y = Application.GetRealHeight(276),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(44),
                SelectedBackgroundColor = CSS_Color.MainColor,
                BackgroundColor = CSS_Color.PromptingColor1,
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.MainBackgroundColor,
                TextID = StringId.Resend,
                TextSize = CSS_FontSize.SubheadingFontSize,
                IsBold = true,
                Radius = (uint)Application.GetRealWidth(22),
                BorderColor = 0x00000000,
                BorderWidth = 0,
            };
            bodyView.AddChidren(btnResend);
            LoadThread_SendVerCode();
            LoadEvent_Resend();
            LoadEvent_VerificationEntryEvent();
        }
    }
    //---------------------------------------------
    public partial class NewBindVerificationCodePage
    {
        /// <summary>
        /// 验证码输入变化事件
        /// </summary>
        void LoadEvent_VerificationEntryEvent()
        {
            EventHandler<MouseEventArgs> clickEvent = (sender, e) => {
                et.Foucs = true;
                var etCode = et.Text;
                switch (etCode.Length)
                {
                    case 0:
                        btnNum1Line.IsSelected = true;
                        btnNum2Line.IsSelected = false;
                        btnNum3Line.IsSelected = false;
                        btnNum4Line.IsSelected = false;
                        btnNum5Line.IsSelected = false;
                        btnNum6Line.IsSelected = false;
                        btnNum1Line.Height = Application.GetRealHeight(2);
                        btnNum2Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        break;
                    case 1:
                        btnNum2Line.IsSelected = true;
                        btnNum1Line.IsSelected = false;
                        btnNum3Line.IsSelected = false;
                        btnNum4Line.IsSelected = false;
                        btnNum5Line.IsSelected = false;
                        btnNum6Line.IsSelected = false;
                        btnNum1Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Height = Application.GetRealHeight(2);
                        btnNum3Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        break;
                    case 2:
                        btnNum3Line.IsSelected = true;
                        btnNum1Line.IsSelected = false;
                        btnNum2Line.IsSelected = false;
                        btnNum4Line.IsSelected = false;
                        btnNum5Line.IsSelected = false;
                        btnNum6Line.IsSelected = false;
                        btnNum1Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Height = Application.GetRealHeight(3);
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        break;
                    case 3:
                        btnNum4Line.IsSelected = true;
                        btnNum1Line.IsSelected = false;
                        btnNum2Line.IsSelected = false;
                        btnNum3Line.IsSelected = false;
                        btnNum5Line.IsSelected = false;
                        btnNum6Line.IsSelected = false;
                        btnNum1Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Height = Application.GetRealHeight(4);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        break;
                    case 4:
                        btnNum5Line.IsSelected = true;
                        btnNum1Line.IsSelected = false;
                        btnNum2Line.IsSelected = false;
                        btnNum3Line.IsSelected = false;
                        btnNum4Line.IsSelected = false;
                        btnNum6Line.IsSelected = false;
                        btnNum1Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(5);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        break;
                    case 5:
                        btnNum6Line.IsSelected = true;
                        btnNum1Line.IsSelected = false;
                        btnNum2Line.IsSelected = false;
                        btnNum3Line.IsSelected = false;
                        btnNum4Line.IsSelected = false;
                        btnNum5Line.IsSelected = false;
                        btnNum1Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(2);
                        break;
                }
            };
            btnNum1.MouseUpEventHandler = clickEvent;
            btnNum2.MouseUpEventHandler = clickEvent;
            btnNum3.MouseUpEventHandler = clickEvent;
            btnNum4.MouseUpEventHandler = clickEvent;
            btnNum5.MouseUpEventHandler = clickEvent;
            btnNum6.MouseUpEventHandler = clickEvent;
            et.TextChangeEventHandler = (sender, e) => {
                var etCode = et.Text;
                switch (etCode.Length)
                {
                    case 0:
                        btnNum1Line.IsSelected = true;
                        btnNum2Line.IsSelected = false;
                        btnNum3Line.IsSelected = false;
                        btnNum4Line.IsSelected = false;
                        btnNum5Line.IsSelected = false;
                        btnNum6Line.IsSelected = false;
                        btnNum1Line.Height = Application.GetRealHeight(2);
                        btnNum2Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum1.Text = "";
                        btnNum2.Text = "";
                        btnNum3.Text = "";
                        btnNum4.Text = "";
                        btnNum5.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 1:
                        btnNum2Line.IsSelected = true;
                        btnNum1Line.IsSelected = false;
                        btnNum3Line.IsSelected = false;
                        btnNum4Line.IsSelected = false;
                        btnNum5Line.IsSelected = false;
                        btnNum6Line.IsSelected = false;
                        btnNum1.Text = etCode.Substring(0, 1);
                        btnNum1Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Height = Application.GetRealHeight(2);
                        btnNum3Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum2.Text = "";
                        btnNum3.Text = "";
                        btnNum4.Text = "";
                        btnNum5.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 2:
                        btnNum3Line.IsSelected = true;
                        btnNum1Line.IsSelected = false;
                        btnNum2Line.IsSelected = false;
                        btnNum4Line.IsSelected = false;
                        btnNum5Line.IsSelected = false;
                        btnNum6Line.IsSelected = false;
                        btnNum2.Text = etCode.Substring(1, 1);
                        btnNum1Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Height = Application.GetRealHeight(2);
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum3.Text = "";
                        btnNum4.Text = "";
                        btnNum5.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 3:
                        btnNum4Line.IsSelected = true;
                        btnNum1Line.IsSelected = false;
                        btnNum2Line.IsSelected = false;
                        btnNum3Line.IsSelected = false;
                        btnNum5Line.IsSelected = false;
                        btnNum6Line.IsSelected = false;
                        btnNum3.Text = etCode.Substring(2, 1);
                        btnNum1Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Height = Application.GetRealHeight(2);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum4.Text = "";
                        btnNum5.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 4:
                        btnNum5Line.IsSelected = true;
                        btnNum1Line.IsSelected = false;
                        btnNum2Line.IsSelected = false;
                        btnNum3Line.IsSelected = false;
                        btnNum4Line.IsSelected = false;
                        btnNum6Line.IsSelected = false;
                        btnNum4.Text = etCode.Substring(3, 1);
                        btnNum1Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(2);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum5.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 5:
                        btnNum6Line.IsSelected = true;
                        btnNum1Line.IsSelected = false;
                        btnNum2Line.IsSelected = false;
                        btnNum3Line.IsSelected = false;
                        btnNum4Line.IsSelected = false;
                        btnNum5Line.IsSelected = false;
                        btnNum5.Text = etCode.Substring(4, 1);
                        btnNum1Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(2);
                        btnNum6.Text = "";
                        break;
                    case 6:
                        btnNum6.Text = etCode.Substring(5, 1);
                        et.Foucs = false;
                        new Thread(() =>
                        {
                            bool result = false;
                            Action act = () => { };
                            Application.RunOnMainThread(() =>
                            {
                                act = new PublicAssmebly().TipLoadingMsgDialog(Language.StringByID(StringId.SavingPleaseWait));
                            });
                            var resultObj = new HttpServerRequest().BindAccount(verAccount, etCode, isPhone);
                            if (resultObj == StateCode.SUCCESS)
                            {
                                result = true;
                            }
                            else
                            {
                                //失败提示
                                IMessageCommon.Current.ShowErrorInfoAlter(resultObj);
                            }
                            Application.RunOnMainThread(() =>
                            {
                                act();
                            });
                            if (result)
                            {
                                //绑定成功
                                BindSuccess();
                            }
                        })
                        { IsBackground = true }.Start();
                        break;
                }
            };
        }
        /// <summary>
        /// 绑定成功
        /// </summary>
        void BindSuccess()
        {
            Application.RunOnMainThread(() =>
            {
                var tipTitle = "";
                var tipMsg = "";
                if (isPhone)
                {
                     UserInfo.Current.userMobileInfo = verAccount;
                    //请使用新的手机账号登录APP
                    tipMsg = Language.StringByID(StringId.PleaseLoginWithNewMobileAccount);
                    if (isModifyBind)
                    {
                        //登录手机修改完成
                        tipTitle = Language.StringByID(StringId.LoginMobileAccountModificationCompleted);
                    }
                    else
                    {
                        //登录手机绑定完成
                        tipTitle = Language.StringByID(StringId.LoginMobileAccountBindCompleted);
                    }
                }
                else
                {
                     UserInfo.Current.userEmailInfo = verAccount;
                    //请使用新的邮箱账号登录APP
                    tipMsg = Language.StringByID(StringId.PleaseLoginWithNewEmailAccount);
                    if (isModifyBind)
                    {
                        //登录邮箱修改完成
                        tipTitle = Language.StringByID(StringId.LoginEmailAccountModificationCompleted);
                    }
                    else
                    {
                        //登录邮箱绑定完成
                        tipTitle = Language.StringByID(StringId.LoginEmailAccountBindCompleted);
                    }
                }
                var page = new OperationResultDisPalyPage();
                page.Show();
                page.LoadPage(true, Language.StringByID(titleId), tipTitle, tipMsg);
                if (isModifyBind)
                {
                    ClosePageWithCount(3);
                }
                else
                {
                    ClosePageWithCount(2);
                }
                action(verAccount);
            });
        }
        /// <summary>
        /// 指定关闭页面个数
        /// </summary>
        /// <param name="countPage"></param>
        void ClosePageWithCount(int countPage)
        {
            //关闭多少个页面
            for (int i = 0; i < countPage; i++)
            {
                MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
            }
        }
        /// <summary>
        /// 重发验证码等待线程
        /// </summary>
        void LoadThread_SendVerCode()
        {
            btnResend.IsSelected = false;
            et.Foucs = true;
            if (time == 0)
            {
                time = 60;
                new Thread(() =>
                {
                    //2.2  获取验证码
                    ResponsePackNew resultObj;
                    if (!isPhone)//邮箱
                    {
                        resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, verAccount);
                    }
                    else
                    {
                        resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, verAccount, true, phoneZoneCode);
                    }
                })
                { IsBackground = true }.Start();
            }
            new Thread(() =>
            {
                while (time > 0)
                {
                    time--;
                    Application.RunOnMainThread(() =>
                    {
                        btnResend.Text = time.ToString() + "s";
                    });
                    Thread.Sleep(1000);
                }
                Application.RunOnMainThread(() =>
                {
                    btnResend.IsSelected = true;
                    btnResend.TextID = StringId.GetVerificationCode;
                    time = 0;
                });
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 重发验证码事件
        /// </summary>
        void LoadEvent_Resend()
        {
            btnResend.MouseUpEventHandler = (sender, e) => {
                LoadThread_SendVerCode();
            };
        }
        /// <summary>
        /// 返回二次确认事件
        /// </summary>
        void BackConfirmAction()
        {
            //验证码发送成功,二次确认退出
            if (btnTip.TextID == StringId.VerificationCodePrompt)
            {
                Action cancelAction = () =>
                {
                    if (bodyView != null)
                    {
                        bodyView.RemoveFromParent();
                    }
                };
                new ConfirmDialog().ShowDialog(StringId.Tip, StringId.VerificationCodeMayBeDelayed, null, cancelAction, StringId.ReturnStr, StringId.WaitAMoment);
            }
            else
            {
                //直接关闭
                if (bodyView != null)
                {
                    bodyView.RemoveFromParent();
                }
            }
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/ChooseShareMemberTargetListPageBLL.cs
@@ -236,7 +236,7 @@
            else
            {
                //提示
                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Child_FindAll, responePack.Code);
                IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code);
                //账号或者密码错误
                Application.RunOnMainThread(() =>
                {
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs
@@ -111,7 +111,7 @@
            else
            {
                //提示
                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Child_FindAll, responePack.Code);
                IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code);
                //账号或者密码错误
                Application.RunOnMainThread(() =>
                {
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPageBLL.cs
@@ -17,8 +17,8 @@
            {
                Action action = () =>
                {
                    ResponsePack responePack = new HttpServerRequest().DeleteResidenceMemberAccount(memberInfo.SubAccountDistributedMark);
                    if (responePack.StateCode.ToUpper() == StateCode.SUCCESS)
                    var responePack = new HttpServerRequest().DeleteResidenceMemberAccount(memberInfo);
                    if (responePack.Code == StateCode.SUCCESS)
                    {
                        this.RemoveFromParent();
                        backAction();
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -61,10 +61,10 @@
                };
                dispalyView.AddChidren(contentView);
                if (MainPage.LoginUser.regionList.Count < 3)
                if ( UserInfo.Current.regionList.Count < 3)
                {
                }
                else if (MainPage.LoginUser.regionList.Count < 4)
                else if ( UserInfo.Current.regionList.Count < 4)
                {
                    dispalyView = new FrameLayout()
                    {
@@ -79,7 +79,7 @@
                    contentView.Height = Application.GetRealHeight(45 * 3);
                    dispalyView.AddChidren(contentView);
                }
                else if (MainPage.LoginUser.regionList.Count < 5)
                else if ( UserInfo.Current.regionList.Count < 5)
                {
                    dispalyView = new FrameLayout()
                    {
@@ -113,7 +113,7 @@
                foreach (var home in MainPage.LoginUser.regionList)
                foreach (var home in  UserInfo.Current.regionList)
                {
                    var btnHomeName = new Button()
                    {
@@ -130,7 +130,7 @@
                    };
                    contentView.AddChidren(btnHomeName);
                    if (MainPage.LoginUser.regionList.IndexOf(home) < MainPage.LoginUser.regionList.Count - 1)
                    if ( UserInfo.Current.regionList.IndexOf(home) <  UserInfo.Current.regionList.Count - 1)
                    {
                        contentView.AddChidren(new Button()
                        {
@@ -145,7 +145,7 @@
                        var regionId = (string)btnHomeName.Tag;
                        dialog.Close();
                        //DB_ResidenceData.residenceData.CurReginID = regionId;
                        LoadEvent_ChangeCurHome(MainPage.LoginUser.regionList.Find((obj) => obj.RegionID == regionId));
                        LoadEvent_ChangeCurHome( UserInfo.Current.regionList.Find((obj) => obj.RegionID == regionId));
                        LoadContentView();
                    };
                }
@@ -208,7 +208,7 @@
                    }
                    //倒出新住宅数据
                    FileUtils.RestoreRegionFiles(newRegionRootPath);
                    MainPage.LoginUser.SaveUserInfo();
                     UserInfo.Current.SaveUserInfo();
                    DB_ResidenceData.residenceData.EixtAccount();
                    DB_ResidenceData.residenceData.CurReginID = homeTemp.RegionID;
                    OnAppConfig.Instance.SaveUserConfig();
@@ -270,11 +270,11 @@
            {
                Action updataHeadImage = () =>
                {
                    userHeadImageView.ImagePath = MainPage.LoginUser.headImagePagePath;
                    userHeadImageView.ImagePath =  UserInfo.Current.headImagePagePath;
                };
                Action updataUserName = () =>
                {
                    btnUserName.Text = MainPage.LoginUser.userName;
                    btnUserName.Text =  UserInfo.Current.userName;
                };
                var personalDataView = new PersonalDataPage(updataHeadImage, updataUserName);
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -197,7 +197,7 @@
                Width = Application.GetMinRealAverage(84),
                Height = Application.GetMinRealAverage(84),
                Radius = (uint)Application.GetMinRealAverage(42),
                ImagePath = MainPage.LoginUser.headImagePagePath,
                ImagePath =  UserInfo.Current.headImagePagePath,
            };
            headPortraitView.AddChidren(userHeadImageView);
@@ -245,7 +245,7 @@
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                Text = string.IsNullOrEmpty(MainPage.LoginUser.userName) ? "不愿意透露姓名的用户" : MainPage.LoginUser.userName
                Text = string.IsNullOrEmpty( UserInfo.Current.userName) ? Language.StringByID(StringId.UsersWhoNameIsEmpty) :  UserInfo.Current.userName
            };
            userNameView.AddChidren(btnUserName);
            /// <summary>
@@ -342,7 +342,7 @@
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                Text = string.IsNullOrEmpty(MainPage.LoginUser.userEmailInfo) ? Language.StringByID(StringId.Unbound) : MainPage.LoginUser.userEmailInfo
                Text = GetBindAccountText( UserInfo.Current.userEmailInfo)
            };
            userEmailInfoView.AddChidren(btnUserEmailInfo);
            /// <summary>
@@ -391,7 +391,7 @@
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                Text = string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) ? Language.StringByID(StringId.Unbound) : MainPage.LoginUser.userMobileInfo
                Text = GetBindAccountText( UserInfo.Current.userMobileInfo)
            };
            userPhoneInfoView.AddChidren(btnUserPhoneInfo);
            /// <summary>
@@ -540,6 +540,7 @@
            }
            LoadEventList();
        }
        /// <summary>
@@ -617,5 +618,24 @@
            LoadEvent_PictureOptionViewEventList(pictureBaseView);
        }
        /// <summary>
        /// 获取绑定账号显示文本,空的时候显示为未绑定
        /// </summary>
        /// <param name="account"></param>
        string GetBindAccountText(string account)
        {
            return string.IsNullOrEmpty(account) ? Language.StringByID(StringId.Unbound) : account;
        }
        /// <summary>
        /// 判断是否为未绑定
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        bool CheckIfUnbound(string account)
        {
            return string.IsNullOrEmpty(account) || account == Language.StringByID(StringId.Unbound);
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs
@@ -19,6 +19,7 @@
            LoadEvent_ChangeBindEmail();
            LoadEvent_ChangeBindPhone();
            LoadEvent_SkipModifyPassword();
            GetUserInfo();
        }
        /// <summary>
@@ -33,11 +34,9 @@
        }
        /// <summary>
        /// 退出账号登录事件
        /// 退出登录操作
        /// </summary>
        void LoadEvent_Logout()
        {
            btnLogout.MouseUpEventHandler += (sender, e) =>
        void Logout()
            {
                #region 保存本地数据至文件夹
                string oldRegionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID.ToString());
@@ -69,10 +68,24 @@
                }).Start();
                #endregion
                MainPage.LoginUser.lastTime = DateTime.MinValue;
                MainPage.LoginUser.SaveUserInfo();
                MainPage.GoLoginPage(MainPage.LoginUser);
            UserInfo.Current.lastTime = DateTime.MinValue;
            UserInfo.Current.SaveUserInfo();
            MainPage.GoLoginPage(UserInfo.Current);
                DB_ResidenceData.residenceData.EixtAccount();
        }
        /// <summary>
        /// 退出账号登录事件
        /// </summary>
        void LoadEvent_Logout()
        {
            btnLogout.MouseUpEventHandler += (sender, e) =>
            {
                Action okAction = () =>
                {
                    Logout();
                };
                new ConfirmDialog().ShowDialog(StringId.Tip, StringId.IfConfirmLogout, okAction);
            };
        }
@@ -85,7 +98,8 @@
            {
                baseView.RemoveFromParent();
            };
            baseView.MouseUpEventHandler = (sender, e) => {
            baseView.MouseUpEventHandler = (sender, e) =>
            {
                baseView.RemoveFromParent();
            };
            btnCancel.MouseUpEventHandler = (sender, e) =>
@@ -105,7 +119,7 @@
                {
                    if (imagePath != null)
                    {
                        MainPage.LoginUser.headImagePagePath = imagePath.ToString();
                        UserInfo.Current.headImagePagePath = imagePath.ToString();
                        userHeadImageView.ImagePath = imagePath.ToString();
                        updataHeadImage();
                        new System.Threading.Thread(() =>
@@ -113,7 +127,7 @@
                            new DAL.Server.HttpServerRequest().UpdataUserHeadImage(imagePath);
                        })
                        { IsBackground = true }.Start();
                        MainPage.LoginUser.SaveUserInfo();
                        UserInfo.Current.SaveUserInfo();
                        MainPage.Log("SelectPicture 裁剪图片返回路径: " + imagePath);
                    }
                }), pid.ToString(), 1, 1);
@@ -134,7 +148,7 @@
                {
                    if (imagePath != null)
                    {
                        MainPage.LoginUser.headImagePagePath = imagePath.ToString();
                        UserInfo.Current.headImagePagePath = imagePath.ToString();
                        userHeadImageView.ImagePath = imagePath.ToString();
                        updataHeadImage();
@@ -142,7 +156,7 @@
                        {
                            new DAL.Server.HttpServerRequest().UpdataUserHeadImage(imagePath);
                        })
                        { IsBackground = true }.Start(); MainPage.LoginUser.SaveUserInfo();
                        { IsBackground = true }.Start(); UserInfo.Current.SaveUserInfo();
                        MainPage.Log("SelectPicture 裁剪图片返回路径: " + imagePath);
                    }
                }, pid.ToString(), 1, 1);
@@ -170,7 +184,7 @@
                        }.Show(bodyView);
                        return;
                    }
                    if(str == MainPage.LoginUser.userName)
                    if (str == UserInfo.Current.userName)
                    {
                        return;
                    }
@@ -183,8 +197,8 @@
                            var resultObj = new HttpServerRequest().EditUserName(str);
                            if (resultObj.Code == StateCode.SUCCESS)
                            {
                                MainPage.LoginUser.userName = str;
                                MainPage.LoginUser.SaveUserInfo();
                                UserInfo.Current.userName = str;
                                UserInfo.Current.SaveUserInfo();
                                Application.RunOnMainThread(() =>
                                {
                                    btnUserName.Text = str;
@@ -194,7 +208,7 @@
                            else
                            {
                                //失败提示
                                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Member_UpdateMemberInfo, resultObj.Code);
                                IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                            }
                        }
                        catch (Exception ex)
@@ -211,7 +225,7 @@
                    })
                    { IsBackground = true }.Start();
                };
                new PublicAssmebly().LoadDialog_EditParater(StringId.ChangeName, MainPage.LoginUser.userName, callBack, StringId.UesrNameCannotBeEmpty, 0, new System.Collections.Generic.List<string>());
                new PublicAssmebly().LoadDialog_EditParater(StringId.ChangeName, UserInfo.Current.userName, callBack, StringId.UesrNameCannotBeEmpty, 0, new System.Collections.Generic.List<string>());
            };
            btnUserName.MouseUpEventHandler = eventHandler;
            btnEditUserNameIcon.MouseUpEventHandler = eventHandler;
@@ -223,36 +237,65 @@
        /// </summary>
        void LoadEvent_ChangeBindEmail()
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                Action<string> action = (email) =>
                {
                    btnUserEmailInfo.Text = email;
                    btnUserEmailInfo.Text = GetBindAccountText(email);
                };
                if (CheckIfUnbound(btnUserEmailInfo.Text))
                {
                    //未绑定,跳转新绑定页面
                    var aep = new NewBindAccountPage();
                    MainPage.BasePageView.AddChidren(aep);
                    aep.LoadPage(action);
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
                else
                {
                var aep = new AccountBindInfoPage();
                MainPage.BasePageView.AddChidren(aep);
                aep.LoadPage(action,1,StringId.EmailAddress);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
            };
            btnUserEmailInfo.MouseUpEventHandler = eventHandler;
            btnUserEmailRight.MouseUpEventHandler = eventHandler;
            userEmailInfoView.MouseUpEventHandler = eventHandler;
        }
        /// <summary>
        /// 修改绑定手机
        /// </summary>
        void LoadEvent_ChangeBindPhone()
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                Action<string> action = (phone) =>
                {
                    btnUserPhoneInfo.Text = phone;
                    btnUserPhoneInfo.Text = GetBindAccountText(phone);
                };
                if (CheckIfUnbound(btnUserPhoneInfo.Text))
                {
                    //未绑定,跳转新绑定页面
                    var aep = new NewBindAccountPage();
                    MainPage.BasePageView.AddChidren(aep);
                    aep.LoadPage(action, true);
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
                else
                {
                var aep = new AccountBindInfoPage();
                MainPage.BasePageView.AddChidren(aep);
                aep.LoadPage(action, 2, StringId.PhoneInfo);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
            };
            btnUserPhoneInfo.MouseUpEventHandler = eventHandler;
            btnUserPhoneRight.MouseUpEventHandler = eventHandler;
@@ -283,7 +326,8 @@
        /// </summary>
        void LoadEvent_SkipModifyPassword()
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var page = new ResetPasswordOptionPage();
                MainPage.BasePageView.AddChidren(page);
                page.LoadPage();
@@ -294,5 +338,16 @@
            resetPasswordView.MouseUpEventHandler = eventHandler;
        }
        /// <summary>
        ///
        /// </summary>
        void GetUserInfo()
        {
            new System.Threading.Thread(() =>
            {
                new HttpServerRequest().GetUserInfo();
            })
            { IsBackground = true }.Start();
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordOptionPage.cs
@@ -93,7 +93,7 @@
        {
            if (verificationOption == 0)
            {
                if (string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo))
                if (string.IsNullOrEmpty( UserInfo.Current.userMobileInfo))
                {
                    LoadDialog_UnbindTipInfo(verificationOption);
                }
@@ -102,13 +102,13 @@
                    this.RemoveFromParent();
                    var vcp = new ResetPasswordVerificationCodePage();
                    MainPage.BasePageView.AddChidren(vcp);
                    vcp.LoadPage(StringId.PhoneNumberVerification,2);
                    vcp.LoadPage(StringId.PhoneNumberVerification, true,  UserInfo.Current.userMobileInfo);
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
            }
            else
            {
                if (string.IsNullOrEmpty(MainPage.LoginUser.userEmailInfo))
                if (string.IsNullOrEmpty( UserInfo.Current.userEmailInfo))
                {
                    LoadDialog_UnbindTipInfo(verificationOption);
                }
@@ -117,7 +117,7 @@
                    this.RemoveFromParent();
                    var vcp = new ResetPasswordVerificationCodePage();
                    MainPage.BasePageView.AddChidren(vcp);
                    vcp.LoadPage(StringId.EmailVerification,1);
                    vcp.LoadPage(StringId.EmailVerification, false,  UserInfo.Current.userEmailInfo);
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
            }
@@ -134,16 +134,7 @@
            dialogView.MouseUpEventHandler = (sender, e) => {
                dialog.Close();
            };
            Button btnTitleIcon = new Button()
            {
                X = Application.GetRealWidth(108),
                Y = Application.GetRealWidth(152),
                Width = Application.GetRealWidth(160),
                Height = Application.GetRealWidth(160),
                UnSelectedImagePath = "PersonalCenter/ResetPassword/DialogTipTitleIcon.png"
            };
            dialogView.AddChidren(btnTitleIcon);
            dialog.AddChidren(dialogView);
            FrameLayout contentView = new FrameLayout()
            {
@@ -155,6 +146,19 @@
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            dialogView.AddChidren(contentView);
            Button btnTitleIcon = new Button()
            {
                X = Application.GetRealWidth(108),
                Y = Application.GetRealWidth(152),
                Width = Application.GetRealWidth(160),
                Height = Application.GetRealWidth(160),
                UnSelectedImagePath = "PersonalCenter/ResetPassword/DialogTipTitleIcon.png"
            };
            dialogView.AddChidren(btnTitleIcon);
            btnTitleIcon.MouseUpEventHandler = (sender, e) => {
                dialog.Close();
            };
            Button btnMsg = new Button()
            {
@@ -177,7 +181,7 @@
                TextAlignment = TextAlignment.Center,
                Radius = (uint)Application.GetRealWidth(22),
                BackgroundColor = CSS_Color.MainColor,
                TextID = StringId.PhoneNumberVerification,
                TextID = StringId.GoBind,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.MainBackgroundColor,
            };
@@ -187,10 +191,20 @@
            {
                dialog.Close();
                Action<string> action = (obj) => { };
                var vcp = new BindAccountPage();
                MainPage.BasePageView.AddChidren(vcp);
                vcp.LoadPage(action, verificationOption == 0 ? StringId.BindPhone : StringId.BindEmail);
                //var vcp = new BindAccountPage();
                //MainPage.BasePageView.AddChidren(vcp);
                //vcp.LoadPage(action, verificationOption == 0 ? StringId.BindPhone : StringId.BindEmail);
                //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                //是否为换绑手机
                var isPhone = verificationOption == 0;
                //跳转新绑定页面
                var aep = new NewBindAccountPage();
                MainPage.BasePageView.AddChidren(aep);
                aep.LoadPage(action, isPhone);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            dialog.Show();
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs
@@ -2,12 +2,46 @@
using Shared;
using HDL_ON.UI.CSS;
using HDL_ON.DAL.Server;
using System.Threading;
namespace HDL_ON.UI
{
    public partial class ResetPasswordPage : FrameLayout
    {
        /// <summary>
        /// 是否手机
        /// </summary>
        public bool isPhone;
        /// <summary>
        /// 账号
        /// </summary>
        public string account;
        /// <summary>
        /// 验证码
        /// </summary>
        public string verCode;
        #region 控件View
        /// <summary>
        /// 密码文本框
        /// </summary>
        EditText etPassword;
        /// <summary>
        /// 确认密码文本框
        /// </summary>
        EditText etRepeatPassword;
        /// <summary>
        /// 修改按钮
        /// </summary>
        Button btnReset;
        /// <summary>
        ///
        /// </summary>
        FrameLayout bodyView;
        #endregion
        public ResetPasswordPage()
        {
            bodyView = this;
@@ -15,61 +49,268 @@
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(StringId.ModifyPassword)).LoadTopView();
            #region 新密码
            FrameLayout rowView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(rowView);
            //新密码
            Button btnTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(180),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                Text = Language.StringByID(StringId.NewPassword) + ":"
            };
            rowView.AddChidren(btnTitle);
            etPassword = new EditText()
            {
                Width = Application.GetRealWidth(359),
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                SecureTextEntry = true,
                TextAlignment = TextAlignment.CenterRight,
                Foucs = true
            };
            rowView.AddChidren(etPassword);
            var lineView = new LineView();
            rowView.AddChidren(lineView);
            lineView.Y = rowView.Height - lineView.Height;
            #endregion
            #region 再次输入新密码
            FrameLayout rowView2 = new FrameLayout()
            {
                Y = rowView.Bottom,
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(rowView2);
            //再次输入新密码
            Button btnTitle2 = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(180),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                //TextID = StringId.NewPasswordAgain,
                Text = Language.StringByID(StringId.NewPasswordAgain) + ":"
            };
            rowView2.AddChidren(btnTitle2);
            etRepeatPassword = new EditText()
            {
                Width = Application.GetRealWidth(359),
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                SecureTextEntry = true,
                TextAlignment = TextAlignment.CenterRight,
            };
            rowView2.AddChidren(etRepeatPassword);
            #endregion
            btnReset = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(224),
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(44),
                Radius = (uint)Application.GetRealHeight(22),
                SelectedBackgroundColor = CSS_Color.MainColor,
                BackgroundColor = CSS_Color.PromptingColor1,
                TextID = StringId.Confirm,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.MainBackgroundColor,
                TextAlignment = TextAlignment.Center,
            };
            bodyView.AddChidren(btnReset);
            LoadEvent_Reset();
            LoadEvent_EditTextFcousChange();
        }
    }
    public partial class ResetPasswordPage
    {
        public void ResetPassword(string password,string repeatPassword )
        {
            var waitPage = new Loading();
            waitPage.Start("Please wait...");
            var resetResult = new HttpServerRequest().ResetPassword(MainPage.LoginUser.accountString, password, repeatPassword, 86);
            if (resetResult.StateCode.ToUpper() == StateCode.SUCCESS)
            {
                Application.RunOnMainThread(() =>
                {
                    var page = new OperationResultDisPalyPage();
                    page.Show();
                    page.LoadPage(true, Language.StringByID(StringId.UnbindEmail), Language.StringByID(StringId.UnbindEmailSuccess), "");
                    for (int i = 0; i < 2; i++)
        /// <summary>
        /// 指定关闭页面个数
        /// </summary>
        /// <param name="countPage"></param>
        void ClosePageWithCount(int countPage)
        {
            //关闭多少个页面
            for (int i = 0; i < countPage; i++)
                    {
                        MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
                    }
                });
            }
            else
        /// <summary>
        ///
        /// </summary>
        /// <param name="password"></param>
        void ResetPassword(string password)
            {
                string erorrInfo = "";
                switch (resetResult.StateCode)
            //校验密码是否符合要求
            if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13)
                {
                    case "PwdNoConfirm"://两次输入的密码不一致
                        erorrInfo = Language.StringByID(StringId.IncorrectRepeatPassword);
                        break;
                    case "AccountNoExists"://两次输入的密码不一致
                        erorrInfo = Language.StringByID(StringId.AccountNotExist);
                        break;
                    default:
                        erorrInfo = "Server error";
                        break;
                }
                Application.RunOnMainThread(() =>
                {
                    waitPage.Hide();
                    new Tip()
                    {
                        CloseTime = 1,
                        Direction = AMPopTipDirection.None,
                        Text = erorrInfo,
                    Text = Language.StringByID(StringId.PasswordIsUnqualified)
                    }.Show(bodyView);
                return;
            }
            //校验两次输入的密码是否一致
            if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
            {
                new Tip()
                {
                    CloseTime = 1,
                    Direction = AMPopTipDirection.None,
                    Text = Language.StringByID(StringId.IncorrectRepeatPassword)
                }.Show(bodyView);
                return;
            }
            var waitPage = new Loading();
            waitPage.Start("Please wait...");
            new Thread(() =>
            {
                try
                {
                    // 忘记密码
                    var resultObj = new HttpServerRequest().ForgetPassword(account, password, verCode, isPhone);
                    if (resultObj.Code == StateCode.SUCCESS)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            Utlis.ShowTip(Language.StringByID(StringId.PasswordChangeSuccessfully));
                            ClosePageWithCount(2);
                });
            }
                    else
                    {
                        // 提示错误
                        IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                    }
                }
                catch { }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        waitPage.Hide();
                    });
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 加载方式按钮事件
        /// </summary>
        void LoadEvent_Reset()
        {
            btnReset.MouseUpEventHandler += (sender, e) =>
            {
                if (btnReset.IsSelected)
                {
                    ResetPassword(etPassword.Text.ToString());
                }
            };
        }
        /// <summary>
        /// 加载文本框焦点变化事件
        /// </summary>
        void LoadEvent_EditTextFcousChange() {
            //密码文本框焦点变化事件
            etPassword.FoucsChanged += (sender, e) =>
            {
                if (etPassword.Foucs)
                {
                }
                else
                {
                    //校验密码是否符合要求
                    if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13)
                    {
                        new Tip()
                        {
                            CloseTime = 1,
                            Direction = AMPopTipDirection.None,
                            Text = Language.StringByID(StringId.PasswordIsUnqualified)
                        }.Show(bodyView);
                    }
                    else
                    {
                        LoadMothed_EnableResetButton();
                    }
                }
            };
            //确认密码文本框焦点变化事件
            etRepeatPassword.FoucsChanged += (sender, e) =>
            {
                if (etRepeatPassword.Foucs)
                {
                }
                else
                {
                    //校验两次输入的密码是否一致
                    if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
                    {
                        new Tip()
                        {
                            CloseTime = 1,
                            Direction = AMPopTipDirection.None,
                            Text = Language.StringByID(StringId.IncorrectRepeatPassword)
                        }.Show(bodyView);
                    }
                    else
                    {
                        LoadMothed_EnableResetButton();
                    }
                }
            };
        }
        /// <summary>
        /// 使能修改确定按钮
        /// </summary>
        void LoadMothed_EnableResetButton()
        {
            if (!string.IsNullOrEmpty(etPassword.Text) && (etPassword.Text.Trim() == etRepeatPassword.Text.Trim()))
            {
                btnReset.IsSelected = true;
            }
            else
            {
                btnReset.IsSelected = false;
            }
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordVerificationCodePage.cs
@@ -32,25 +32,55 @@
        Button btnResend;
        /// <summary>
        ///
        /// </summary>
        Button btnTip;
        int titleId;
        ///// <summary>
        ///// 操作类型 1:邮箱,2:手机
        ///// </summary>
        //int optionType;
        /// <summary>
        /// 操作类型 1:邮箱,2:手机
        /// 是否手机
        /// </summary>
        int optionType;
        bool isPhone;
        /// <summary>
        /// 账号
        /// </summary>
        string account;
        public ResetPasswordVerificationCodePage()
        {
            bodyView = this;
        }
        public void LoadPage(int tId, int ot)
        /// <summary>
        ///
        /// </summary>
        /// <param name="tId"></param>
        /// <param name="isPhone">是否手机</param>
        /// <param name="account">账号</param>
        public void LoadPage(int tId, bool isPhone, string account)
        {
            titleId = tId;
            optionType = ot;
            this.isPhone = isPhone;
            this.account = account;
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(tId)).LoadTopView();
            Button btnTip = new Button()
            Action backAction = () =>
            {
                Application.HideSoftInput();
                BackConfirmAction();
            };
            new TopViewDiv(bodyView, Language.StringByID(tId), false).LoadTopView(backAction);
            //new TopViewDiv(bodyView, Language.StringByID(tId)).LoadTopView();
            btnTip = new Button()
            {
                Y = Application.GetRealHeight(64),
                X = Application.GetRealWidth(16),
@@ -367,12 +397,12 @@
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum1Line.Text = "";
                        btnNum2Line.Text = "";
                        btnNum3Line.Text = "";
                        btnNum4Line.Text = "";
                        btnNum5Line.Text = "";
                        btnNum6Line.Text = "";
                        btnNum1.Text = "";
                        btnNum2.Text = "";
                        btnNum3.Text = "";
                        btnNum4.Text = "";
                        btnNum5.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 1:
                        btnNum2Line.IsSelected = true;
@@ -388,11 +418,11 @@
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Text = "";
                        btnNum3Line.Text = "";
                        btnNum4Line.Text = "";
                        btnNum5Line.Text = "";
                        btnNum6Line.Text = "";
                        btnNum2.Text = "";
                        btnNum3.Text = "";
                        btnNum4.Text = "";
                        btnNum5.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 2:
                        btnNum3Line.IsSelected = true;
@@ -408,10 +438,10 @@
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Text = "";
                        btnNum4Line.Text = "";
                        btnNum5Line.Text = "";
                        btnNum6Line.Text = "";
                        btnNum3.Text = "";
                        btnNum4.Text = "";
                        btnNum5.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 3:
                        btnNum4Line.IsSelected = true;
@@ -427,9 +457,9 @@
                        btnNum4Line.Height = Application.GetRealHeight(2);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Text = "";
                        btnNum5Line.Text = "";
                        btnNum6Line.Text = "";
                        btnNum4.Text = "";
                        btnNum5.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 4:
                        btnNum5Line.IsSelected = true;
@@ -445,8 +475,8 @@
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(2);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Text = "";
                        btnNum6Line.Text = "";
                        btnNum5.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 5:
                        btnNum6Line.IsSelected = true;
@@ -462,11 +492,24 @@
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(2);
                        btnNum6Line.Text = "";
                        btnNum6.Text = "";
                        break;
                    case 6:
                        btnNum6.Text = etCode.Substring(5, 1);
                        et.Foucs = false;
                        //输入完成
                        InputComplete(etCode);
                        break;
                }
            };
        }
        /// <summary>
        /// 输入完成
        /// </summary>
        /// <param name="etCode"></param>
        void InputComplete(string etCode)
        {
                        new Thread(() =>
                        {
                            bool result = false;
@@ -475,8 +518,8 @@
                            {
                                act = new PublicAssmebly().TipLoadingMsgDialog(Language.StringByID(StringId.SavingPleaseWait));
                            });
                            bool isPhone = optionType == 2;
                            var resultObj = new HttpServerRequest().ValidatorCode(VerifyType.FIND_PASSWORD, MainPage.LoginUser.userEmailInfo, etCode, isPhone);
                var resultObj = new HttpServerRequest().ValidatorCode(VerifyType.FIND_PASSWORD, account, etCode, isPhone, false);
                            if (resultObj.Code == StateCode.SUCCESS)
                            {
                                result = true;
@@ -484,7 +527,7 @@
                            else
                            {
                                //失败提示
                                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Verification_Check, resultObj.Code);
                    IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                            }
                            Application.RunOnMainThread(() =>
                            {
@@ -499,24 +542,24 @@
                                Thread.Sleep(1600);
                                Application.RunOnMainThread(() =>
                                {
                                    MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
                                    if (titleId == StringId.EmailVerification)
                                    {
                                    }
                                    else if (titleId == StringId.PhoneNumberVerification)
                                    {
                        //MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
                        this.RemoveFromParent();
                        var vcp = new ResetPasswordPage();
                        vcp.isPhone = isPhone;
                        vcp.account = account;
                        vcp.verCode = etCode;
                        MainPage.BasePageView.AddChidren(vcp);
                        vcp.LoadPage();
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                                    }
                                });
                            }
                        })
                        { IsBackground = true }.Start();
        }
                        break;
                }
            };
        }
        /// <summary>
        /// 重发验证码等待线程
        /// </summary>
@@ -524,22 +567,39 @@
        {
            btnResend.IsSelected = false;
            int time = 60;
            try
            {
            new Thread(() =>
            {
                if (optionType == 1)
                    //2.2  获取验证码
                    ResponsePackNew resultObj;
                    if (!isPhone)
                {
                    var resultObj = new DAL.Server.HttpServerRequest().VerificationCodeSend(VerifyType.FIND_PASSWORD, MainPage.LoginUser.userEmailInfo);
                        resultObj = new DAL.Server.HttpServerRequest().VerificationCodeSend(VerifyType.FIND_PASSWORD, account);
                    }
                    else
                    {
                        resultObj = new DAL.Server.HttpServerRequest().VerificationCodeSend(VerifyType.FIND_PASSWORD, account, true,  UserInfo.Current.areaCode.ToString());
                    }
                }
                else if (optionType == 2)
                    if (resultObj.Code != StateCode.SUCCESS)
                {
                    var resultObj = new DAL.Server.HttpServerRequest().VerificationCodeSend(VerifyType.FIND_PASSWORD, MainPage.LoginUser.userMobileInfo, true, MainPage.LoginUser.areaCode.ToString() );
                }
            })
            { IsBackground = true }.Start();
            new Thread(() =>
                        //发送失败
                        Application.RunOnMainThread(() =>
            {
                            btnTip.TextID = StringId.FailedToSendVerificationCode;
                        });
                        //失败提示
                        IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                    }
                    else
                    {
                        //发送成功,开始倒计时
                        Application.RunOnMainThread(() =>
                        {
                            btnTip.TextID = StringId.VerificationCodePrompt;
                        });
                while (time > 0)
                {
                    time--;
@@ -554,17 +614,55 @@
                    btnResend.IsSelected = true;
                    btnResend.TextID = StringId.GetVerificationCode;
                });
                    }
            })
            { IsBackground = true }.Start();
        }
            catch { }
            finally
            {
            };
        }
        /// <summary>
        /// 重发验证码事件
        /// </summary>
        void LoadEvent_Resend()
        {
            btnResend.MouseUpEventHandler = (sender, e) => {
            btnResend.MouseUpEventHandler = (sender, e) =>
            {
                LoadThread_SendVerCode();
            };
        }
        /// <summary>
        /// 返回二次确认事件
        /// </summary>
        void BackConfirmAction()
        {
            //验证码发送成功,二次确认退出
            if (btnTip.TextID == StringId.VerificationCodePrompt)
            {
                Action cancelAction = () =>
                {
                    if (bodyView != null)
                    {
                        bodyView.RemoveFromParent();
                    }
                };
                new ConfirmDialog().ShowDialog(StringId.Tip, StringId.VerificationCodeMayBeDelayed, null, cancelAction, StringId.ReturnStr, StringId.WaitAMoment);
            }
            else
            {
                //直接关闭
                if (bodyView != null)
                {
                    bodyView.RemoveFromParent();
                }
            }
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs
@@ -49,7 +49,7 @@
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    //MainPage.LoginUser.regionList.Find((obj) => obj.Name == btnResidenceName.Text.Trim()).Name = str;
                                    // UserInfo.Current.regionList.Find((obj) => obj.Name == btnResidenceName.Text.Trim()).Name = str;
                                    btnResidenceName.Text = str;
                                    upateResidenceName();
                                });
HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs
@@ -279,12 +279,12 @@
                {
                    if (optionType == "7")
                    {
                        MainPage.GoLoginPage(MainPage.LoginUser);
                        MainPage.GoLoginPage( UserInfo.Current);
                    }
                    else
                    {
                        Action<string> action = (pw) => {
                            var resultObj = new HttpServerRequest().LoginByPassword(MainPage.LoginUser.accountString, pw);
                            var resultObj = new HttpServerRequest().LoginByPassword( UserInfo.Current.accountString, pw);
                            if (resultObj.Code == StateCode.SUCCESS)
                            {
                                OnAppConfig.Instance.appUnlockPasswrod = "";
@@ -296,7 +296,7 @@
                            else
                            {
                                //登录失败
                                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Login, resultObj.Code);
                                IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                            }
                        };
HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs
@@ -363,12 +363,12 @@
                {
                    if (optionType == "7")
                    {
                        MainPage.GoLoginPage(MainPage.LoginUser);
                        MainPage.GoLoginPage( UserInfo.Current);
                    }
                    else
                    {
                        Action<string> action = (pw) => {
                            var resultObj = new HttpServerRequest().LoginByPassword(MainPage.LoginUser.accountString, pw);
                            var resultObj = new HttpServerRequest().LoginByPassword( UserInfo.Current.accountString, pw);
                            if (resultObj.Code.ToUpper() == StateCode.SUCCESS)
                            {
                                OnAppConfig.Instance.appUnlockPasswrod = "";
@@ -380,7 +380,7 @@
                            else
                            {
                                //登录失败
                                IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Login, resultObj.Code);
                                IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code);
                            }
                        };