| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | |
| | | //bodyView = new FrameLayout(); |
| | | //AddChidren(bodyView); |
| | | bodyView = this; |
| | | //2020-12-22 增加点击隐藏键盘事件 |
| | | bodyView.MouseDownEventHandler += (sender, e) => { |
| | | Application.HideSoftInput(); |
| | | }; |
| | | pm = new HttpServerRequest(); |
| | | } |
| | | |
| | |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | else |
| | | { |
| | | base.RemoveFromParent(); |
| | | } |
| | | |
| | | base.RemoveFromParent(); |
| | | |
| | | ////2020-12-22 增加点击隐藏键盘事件 |
| | | //Application.HideSoftInput(); |
| | | } |
| | | |
| | | #region 局部变量 |
| | |
| | | /// </summary> |
| | | public void LoadView(UserInfo userInfo = null) |
| | | { |
| | | Language.CurrentLanguage = "Chinese"; |
| | | |
| | | var btnIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | |
| | | }; |
| | | bodyView.AddChidren(btnIcon_bg); |
| | | |
| | | #if DEBUG |
| | | btnIcon_bg.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | MainPage.NoLoginMode = true; |
| | | //楼层房间列表 |
| | | var floor1 = new SpatialInfo("FLOOR") { roomName = "F1", parentId = DB_ResidenceData.Instance.CurrentRegion.id }; |
| | | floor1.SaveRoomFile(); |
| | | //处理房间列表 |
| | | var room1 = new Room() { |
| | | roomId = "r1", |
| | | roomName = "客厅", |
| | | parentId = "f1" |
| | | }; |
| | | room1.SaveRoomFile(); |
| | | //功能 |
| | | var light1 = new Function() |
| | | { |
| | | sid = "light1", |
| | | deviceId = "light1", |
| | | name = "RGB1", |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "rgb",value =new List<string>(){ "0","100" }, curValue="0,0,0",state = "0,0,0" }, |
| | | }, |
| | | }; |
| | | light1.SaveFunctionFile(); |
| | | //场景 |
| | | }; |
| | | |
| | | bool b = false; |
| | | btnIcon.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | #if DEBUG |
| | | etAccount.Text = "13375012446";// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";// |
| | | //ESOnVideo.Current.Test(false); |
| | | |
| | | //return; |
| | | if (b) |
| | | { |
| | | etAccount.Text = "15626203746";//测试服务器 |
| | | //etAccount.Text = "13375012446";//测试服务器 |
| | | //etAccount.Text = "1033326940@qq.com"; |
| | | //etAccount.Text = "18022428438";//wjc |
| | | //etAccount.Text = "13602944661";//kx |
| | | //etAccount.Text = "13226233133";//豆豆 |
| | | //etAccount.Text = "18316672920";//lcg "18316672920";//hzx;// "13415629083"//cf;; |
| | | //etAccount.Text = "18316120654";//tujie |
| | | // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 |
| | | } |
| | | else |
| | | { |
| | | //etAccount.Text = "15217626103";// |
| | | //etAccount.Text = "13682244600";//波哥 |
| | | //etAccount.Text = "BB01010101@evoyo.com";//可视对讲 |
| | | //etAccount.Text = "13168123446"; |
| | | //etAccount.Text = "13676202754";//巴林服务器 |
| | | //etAccount.Text = "13602944661";//kx |
| | | etAccount.Text = "551775569@qq.com";//wcf |
| | | //etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374 |
| | | //etAccount.Text = "15971583093";// gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 国外服务器测试 |
| | | } |
| | | b = !b; |
| | | etPassword.Text = "123456"; |
| | | //etPassword.Text = "qqqqqq"; |
| | | btnLogin.IsSelected = true; |
| | | #endif |
| | | }; |
| | | #endif |
| | | |
| | | #region 登录方式选择 |
| | | btnPhoneLogin = new Button() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | | Y = Application.GetRealHeight(177), |
| | | Width = Application.GetRealWidth(120), |
| | | Width = Application.GetRealWidth(150), |
| | | Height = Application.GetRealHeight(40), |
| | | TextID = StringId.LoginByPhone, |
| | | TextColor = CSS_Color.MainColor, |
| | |
| | | |
| | | btnEmailLogin = new Button() |
| | | { |
| | | X = btnPhoneLogin.Right + Application.GetRealWidth(20), |
| | | X = btnPhoneLogin.Right ,//+ Application.GetRealWidth(20), |
| | | Y = Application.GetRealHeight(177), |
| | | Width = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(140), |
| | | Height = Application.GetRealHeight(40), |
| | | TextID = StringId.LoginByEmail, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | |
| | | }; |
| | | bodyView.AddChidren(btnLogin); |
| | | |
| | | LoadEventList(); |
| | | LoadEventList(); |
| | | account = etAccount.Text.Trim(); |
| | | |
| | | #if DEBUG1211 |
| | | #if DEBUG1211 |
| | | //本地模式 |
| | | Button btnLocalMode = new Button() |
| | | { |
| | |
| | | |
| | | MainPage.Log("etAccount.TextAlignment : " + etAccount.TextAlignment.ToString()); |
| | | |
| | | #endif |
| | | #endif |
| | | |
| | | #region 隐私政策 |
| | | AddServiceAgreementControl(bodyView); |
| | |
| | | /// <param name="frameBack"></param> |
| | | private void AddServiceAgreementControl(FrameLayout frameLayout) |
| | | { |
| | | isAgreePrivacyPolicy = UserInfo.Current.isAgreePrivacyPolicy; |
| | | isAgreePrivacyPolicy = OnAppConfig.Instance.isAgreePrivacyPolicy; |
| | | var frameRow = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(28), |
| | |
| | | { |
| | | Height = Application.GetRealHeight(28), |
| | | Width = Application.GetRealWidth(28), |
| | | X = Application.GetRealWidth(82), |
| | | X = Application.GetRealWidth(22), |
| | | }; |
| | | frameRow.AddChidren(agreeView); |
| | | if(Language.CurrentLanguage == "Chinese") |
| | | { |
| | | agreeView.X = Application.GetRealWidth(82); |
| | | } |
| | | //同意图标按钮 |
| | | var agreeBtn = new Button() |
| | | { |
| | |
| | | { |
| | | isAgreePrivacyPolicy = !isAgreePrivacyPolicy; |
| | | agreeBtn.IsSelected = isAgreePrivacyPolicy; |
| | | UserInfo.Current.isAgreePrivacyPolicy = isAgreePrivacyPolicy; |
| | | UserInfo.Current.SaveUserInfo(); |
| | | OnAppConfig.Instance.isAgreePrivacyPolicy = isAgreePrivacyPolicy; |
| | | OnAppConfig.Instance.SaveConfig(); |
| | | }; |
| | | |
| | | agreeBtn.MouseUpEventHandler = eventHandler; |