From 51027e85bda6ef93f5ecfbeb6117d0084b39f242 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期三, 07 八月 2024 10:39:34 +0800 Subject: [PATCH] 服务器选择提示 --- HDL_ON/UI/UI1-Login/SelectServerDialog.cs | 95 +++++++++++++-- HDL-ON_iOS/Resources/Language.ini | 90 ++++++++++++++ HDL-ON_Android/Assets/Language.ini | 90 ++++++++++++++ HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs | 4 HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs | 14 -- HDL_ON/UI/UI1-Login/RegisterPageBLL.cs | 2 HDL_ON/Common/R.cs | 16 ++ HDL_ON/UI/UI1-Login/LoginPage.cs | 10 HDL_ON/UI/UI1-Login/RegisterPage.cs | 2 9 files changed, 279 insertions(+), 44 deletions(-) diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index f1c9fa4..5d74616 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -687,6 +687,9 @@ 700=Add execution action 701=Link method 702=The configuration has been updated and will take effect after restarting. +703=Chinese users choose +704=Non Chinese users choose +705=Please select a server @@ -2089,8 +2092,9 @@ 700=娣诲姞鎵ц鐩爣 701=杩炴帴鏂瑰紡 702=閰嶇疆宸茬粡鏇存柊锛岄噸鍚箣鍚庣敓鏁堛�� - - +703=涓浗鐢ㄦ埛閫夋嫨 +704=闈炰腑鍥界敤鎴烽�夋嫨 +705=璇烽�夋嫨鏈嶅姟鍣� @@ -3489,7 +3493,9 @@ 700=Add execution action 701=Link method 702=The configuration has been updated and will take effect after restarting. - +703=Chinese users choose +704=Non Chinese users choose +705=Please select a server @@ -4884,6 +4890,9 @@ 700=Add execution action 701=Link method 702=The configuration has been updated and will take effect after restarting. +703=Chinese users choose +704=Non Chinese users choose +705=Please select a server 2532=Visitor Invitation Record @@ -6264,6 +6273,10 @@ 700=Add execution action 701=Link method 702=The configuration has been updated and will take effect after restarting. +703=Chinese users choose +704=Non Chinese users choose +705=Please select a server + @@ -7597,6 +7610,77 @@ 634=袪械泻芯屑械薪写芯胁邪薪芯 635=袩芯褌芯褔薪懈泄 泻芯谢褨褉 636=效懈褋谢芯 蟹薪邪褔械薪薪褟 泻芯谢褜芯褉褍 褋泻谢邪写邪褦褌褜褋褟 蟹 6 褑懈褎褉 (褋泻谢邪写邪褦褌褜褋褟 蟹 褔懈褋褌懈褏 褔懈褋械谢/褑懈褎褉+谢褨褌械褉) +637=Delete +638=User Management +639=Closed +640=Open +641=Automatic Coloring +642=LED Banner +643=Unlock method +644=Clear +645=Digital password +646=Card/NFC key +647=Face key +648=Delete user +649=Activity detection +650=Do you want to delete this user? +651=Successfully deleted +652=Unlock settings +653=Face unlock settings +654=Press the button to unlock twice +655=To unlock indoors, press the unlock button twice to prevent children or pets from accidentally touching the lock +656=Child lock mode +657=After opening, the door cannot be unlocked through buttons, only the emergency knob can be used to unlock +658=Anti lock mode +659=After opening, ordinary users cannot unlock, while the main user can still unlock. After opening the door with the indoor button, the anti lock mode will automatically close +660=Deployment mode +661=It is recommended to change the mode when leaving home for a long time. It can also be activated by pressing the blue button that lights up on the door lock keyboard after closing the door +662=Audio settings +663=Battery management +664=Face unlocking +665=After opening, the device can perform facial recognition and unlock +666=Trigger mode +667=Face entry help +668=Manual triggering +669=Automatic triggering +670=After entering the detection range, the door lock will automatically recognize the face and unlock it +671=Note: The distance for recognizing faces is affected by the trigger sensitivity, and the higher the sensitivity, the farther the recognition distance. +672=Need to touch the door lock number button, wake up the door lock, recognize the face, and unlock it +673=Door lock system volume +674=Doorbell volume +675=Low +676=Moderate +677=High +678=Current user data has been cleared, about to return to the previous page. +679=Group control +680=Colorful switch +681=Test +682=Group +683=The time is invalid +684=Length out of range +685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. +686=Total +687=A-phase electricity data +688=B-phase electricity data +689=C-phase electricity data +690=Voltage +691=Current +692=Real-time power +693=Total electricity consumption (KW路h) +694=Hourly electricity consumption in the past 24 hours +695=Daily data of the past month +696=Monthly data of the past year +697=prompt: The closer the starting color selection is to the edge of the color ring, the more obvious the dazzling effect. The closer to the white center, the less noticeable the dazzling effect. +698=Break +699=Choose automation +700=Add execution action +701=Link method +702=The configuration has been updated and will take effect after restarting. +703=Chinese users choose +704=Non Chinese users choose +705=Please select a server + + diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index f1c9fa4..5d74616 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -687,6 +687,9 @@ 700=Add execution action 701=Link method 702=The configuration has been updated and will take effect after restarting. +703=Chinese users choose +704=Non Chinese users choose +705=Please select a server @@ -2089,8 +2092,9 @@ 700=娣诲姞鎵ц鐩爣 701=杩炴帴鏂瑰紡 702=閰嶇疆宸茬粡鏇存柊锛岄噸鍚箣鍚庣敓鏁堛�� - - +703=涓浗鐢ㄦ埛閫夋嫨 +704=闈炰腑鍥界敤鎴烽�夋嫨 +705=璇烽�夋嫨鏈嶅姟鍣� @@ -3489,7 +3493,9 @@ 700=Add execution action 701=Link method 702=The configuration has been updated and will take effect after restarting. - +703=Chinese users choose +704=Non Chinese users choose +705=Please select a server @@ -4884,6 +4890,9 @@ 700=Add execution action 701=Link method 702=The configuration has been updated and will take effect after restarting. +703=Chinese users choose +704=Non Chinese users choose +705=Please select a server 2532=Visitor Invitation Record @@ -6264,6 +6273,10 @@ 700=Add execution action 701=Link method 702=The configuration has been updated and will take effect after restarting. +703=Chinese users choose +704=Non Chinese users choose +705=Please select a server + @@ -7597,6 +7610,77 @@ 634=袪械泻芯屑械薪写芯胁邪薪芯 635=袩芯褌芯褔薪懈泄 泻芯谢褨褉 636=效懈褋谢芯 蟹薪邪褔械薪薪褟 泻芯谢褜芯褉褍 褋泻谢邪写邪褦褌褜褋褟 蟹 6 褑懈褎褉 (褋泻谢邪写邪褦褌褜褋褟 蟹 褔懈褋褌懈褏 褔懈褋械谢/褑懈褎褉+谢褨褌械褉) +637=Delete +638=User Management +639=Closed +640=Open +641=Automatic Coloring +642=LED Banner +643=Unlock method +644=Clear +645=Digital password +646=Card/NFC key +647=Face key +648=Delete user +649=Activity detection +650=Do you want to delete this user? +651=Successfully deleted +652=Unlock settings +653=Face unlock settings +654=Press the button to unlock twice +655=To unlock indoors, press the unlock button twice to prevent children or pets from accidentally touching the lock +656=Child lock mode +657=After opening, the door cannot be unlocked through buttons, only the emergency knob can be used to unlock +658=Anti lock mode +659=After opening, ordinary users cannot unlock, while the main user can still unlock. After opening the door with the indoor button, the anti lock mode will automatically close +660=Deployment mode +661=It is recommended to change the mode when leaving home for a long time. It can also be activated by pressing the blue button that lights up on the door lock keyboard after closing the door +662=Audio settings +663=Battery management +664=Face unlocking +665=After opening, the device can perform facial recognition and unlock +666=Trigger mode +667=Face entry help +668=Manual triggering +669=Automatic triggering +670=After entering the detection range, the door lock will automatically recognize the face and unlock it +671=Note: The distance for recognizing faces is affected by the trigger sensitivity, and the higher the sensitivity, the farther the recognition distance. +672=Need to touch the door lock number button, wake up the door lock, recognize the face, and unlock it +673=Door lock system volume +674=Doorbell volume +675=Low +676=Moderate +677=High +678=Current user data has been cleared, about to return to the previous page. +679=Group control +680=Colorful switch +681=Test +682=Group +683=The time is invalid +684=Length out of range +685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. +686=Total +687=A-phase electricity data +688=B-phase electricity data +689=C-phase electricity data +690=Voltage +691=Current +692=Real-time power +693=Total electricity consumption (KW路h) +694=Hourly electricity consumption in the past 24 hours +695=Daily data of the past month +696=Monthly data of the past year +697=prompt: The closer the starting color selection is to the edge of the color ring, the more obvious the dazzling effect. The closer to the white center, the less noticeable the dazzling effect. +698=Break +699=Choose automation +700=Add execution action +701=Link method +702=The configuration has been updated and will take effect after restarting. +703=Chinese users choose +704=Non Chinese users choose +705=Please select a server + + diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index 8743271..c44e51e 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -1,9 +1,23 @@ using System; +using com.hdl.on; namespace HDL_ON { public static class StringId { + + /// <summary> + /// 璇烽�夋嫨鏈嶅姟鍣� + /// </summary> + public const int PlsSelectServer = 705; + /// <summary> + /// 闈炰腑鍥芥湇鍔″櫒鎻愮ず + /// </summary> + public const int NonChineseServerPrompt = 704; + /// <summary> + /// 涓浗鏈嶅姟鍣ㄦ彁绀� + /// </summary> + public const int ChineseServerPrompt = 703; /// <summary> /// 杩炴帴鏂瑰紡鏇存敼鎻愮ず /// </summary> @@ -3839,7 +3853,7 @@ /// <summary> /// 璇烽�夋嫨鍥藉/鍖哄煙 /// </summary> - public const int PleaseSelectCountryOrRegion = 9018; + //public const int PleaseSelectCountryOrRegion = 9018; /// <summary> /// 绔嬪嵆鏇存柊 /// </summary> diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index 138474d..59aed9c 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -309,9 +309,9 @@ //etAccount.Text = "13922115008";//鍒樻�� //etAccount.Text = "support7@hdlautomation.com"; etAccount.Text = "13336018868"; - etAccount.Text = "13580507523"; - etAccount.Text = "18402017839"; - + etAccount.Text = "649362315@qq.com"; + //etAccount.Text = "18402017839"; + etAccount.Text = "13616515037"; } else @@ -331,9 +331,9 @@ } b = !b; etPassword.Text = "123456"; - if(etAccount.Text == "13336018868") + if(etAccount.Text == "649362315@qq.com") { - etPassword.Text = "zzy20020928"; + etPassword.Text = "aa123456"; } else if(etAccount.Text == "13580507523") { diff --git a/HDL_ON/UI/UI1-Login/RegisterPage.cs b/HDL_ON/UI/UI1-Login/RegisterPage.cs index 38485fc..4307f3a 100644 --- a/HDL_ON/UI/UI1-Login/RegisterPage.cs +++ b/HDL_ON/UI/UI1-Login/RegisterPage.cs @@ -325,7 +325,7 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.PleaseSelectCountryOrRegion, + TextID = StringId.PlsSelectServer, }; serverView.AddChidren(btnServerText); diff --git a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs index 2f046d5..cb6abf2 100644 --- a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs +++ b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs @@ -655,7 +655,7 @@ if (isSelectServer == false) { //璇峰厛閫夋嫨鍥藉/鍖哄煙 - Utlis.ShowTip(Language.StringByID(StringId.PleaseSelectCountryOrRegion)); + Utlis.ShowTip(Language.StringByID(StringId.PlsSelectServer)); ShowServerBottomLineState(true); return false; } diff --git a/HDL_ON/UI/UI1-Login/SelectServerDialog.cs b/HDL_ON/UI/UI1-Login/SelectServerDialog.cs index 5ffe244..5520931 100644 --- a/HDL_ON/UI/UI1-Login/SelectServerDialog.cs +++ b/HDL_ON/UI/UI1-Login/SelectServerDialog.cs @@ -22,6 +22,10 @@ /// </summary> Action selectAction; + Button btnConfrim; + + GlobalRegionListRes selectedRegion; + /// <summary> /// /// </summary> @@ -40,7 +44,7 @@ bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; this.AddChidren(bodyView); //鍔犺浇椤堕儴鑿滃崟鏍� - new TopViewDiv(this, bodyView, Language.StringByID(StringId.PleaseSelectCountryOrRegion)).LoadTopView(); + new TopViewDiv(this, bodyView, Language.StringByID(StringId.PlsSelectServer)).LoadTopView(); //鍔犺浇鏈嶅姟鍣ㄥ尯鍩熼�夋嫨 AddRegionalSelectionView(); //Show @@ -56,8 +60,9 @@ VerticalScrolViewLayout VerticalScrolViewMiddle = new VerticalScrolViewLayout() { - Y = Application.GetRealHeight(64), - Height = bodyView.Height - Application.GetRealHeight(64), + Y = Application.GetRealHeight(74), + Height = bodyView.Height - Application.GetRealHeight(74), + ScrollEnabled = false, }; bodyView.AddChidren(VerticalScrolViewMiddle); @@ -120,6 +125,35 @@ } }); + //var bottomView = new FrameLayout() + //{ + // Y = Application.GetRealHeight(591), + // Height = Application.GetRealHeight(76) + Application.GetRealWidth(44), + // Radius = (uint)Application.GetRealWidth(22), + // BackgroundColor = CSS_Color.MainBackgroundColor, + //}; + //bodyView.AddChidren(bottomView); + + + //btnConfrim = new Button() + //{ + // Gravity = Gravity.CenterHorizontal, + // Y = Application.GetRealHeight(603), + // Width = Application.GetRealWidth(220), + // Height = Application.GetRealWidth(44), + // Radius = (uint)Application.GetRealWidth(22), + // BackgroundColor = CSS_Color.MainColor, + // TextColor = CSS_Color.MainBackgroundColor, + // TextSize = CSS_FontSize.SubheadingFontSize, + // TextAlignment = TextAlignment.Center, + // IsBold = true, + // TextID = StringId.ConfirmAdd, + //}; + //bodyView.AddChidren(btnConfrim); + + //btnConfrim.MouseUpEventHandler = (sender, e) => { + + //}; } /// <summary> @@ -131,27 +165,58 @@ { var rowView = new FrameLayout() { - Height = Application.GetRealHeight(44), + Height = Application.GetRealHeight(60), }; VerticalScrolViewMiddle.AddChidren(rowView); + + rowView.AddChidren(new Button() { + Y = Application.GetRealHeight(50-1), + Height = Application.GetRealHeight(1), + BackgroundColor = CSS_Color.DividingLineColor, + }); var urlBtn = new Button() { X = Application.GetRealWidth(16), - Height = rowView.Height, - Width = Application.GetRealWidth(200), + Width = Application.GetRealWidth(300), + Height = Application.GetRealHeight(30), TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.FirstLevelTitleColor, - TextAlignment = TextAlignment.CenterLeft + TextAlignment = TextAlignment.CenterLeft, + Text = mGlobalRegion.regionName, }; rowView.AddChidren(urlBtn); - //var lineView = new LineView(); - //rowView.AddChidren(lineView); - //lineView.Y = rowView.Height - lineView.Height; + var btnTip = new Button() + { + Y = Application.GetRealHeight(20), + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(300), + Height = Application.GetRealHeight(20), + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextColor = CSS_Color.PromptingColor1, + TextAlignment = TextAlignment.CenterLeft, + }; + rowView.AddChidren(btnTip); + if (mGlobalRegion.regionName.ToLower().Contains("china")) + { + btnTip.TextID = StringId.ChineseServerPrompt; + //if(Language.CurrentLanguage == "Chinese") + //{ + // selectedRegion = mGlobalRegion; + // urlBtn.TextColor = CSS_Color.MainColor; + //} + } + else + { + btnTip.TextID = StringId.NonChineseServerPrompt; + } EventHandler<MouseEventArgs> eHandler = (sender, e) => { + //selectedRegion = mGlobalRegion; + //urlBtn.TextColor = CSS_Color.MainColor; + OnAppConfig.Instance.RequestHttpsHost = mGlobalRegion.regionUrl; OnAppConfig.Instance.GlobalRegion = mGlobalRegion; OnAppConfig.Instance.SaveConfig(); @@ -162,12 +227,10 @@ rowView.MouseUpEventHandler += eHandler; urlBtn.MouseUpEventHandler += eHandler; - urlBtn.Text = mGlobalRegion.regionName; - - if (mGlobalRegion.regionUrl == OnAppConfig.Instance.RequestHttpsHost) - { - urlBtn.TextColor = CSS_Color.MainColor; - } + //if (mGlobalRegion.regionUrl == OnAppConfig.Instance.RequestHttpsHost) + //{ + // urlBtn.TextColor = CSS_Color.MainColor; + //} } } } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs index 575dadd..abce243 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs @@ -938,7 +938,7 @@ { CropImageCallBack(imagePath); - }, imageName, 4, 3); + }, imageName, 4, 3, 0); //} pictureOptionView.Parent.RemoveFromParent(); @@ -957,7 +957,7 @@ CropImage.SelectPicture((imagePath) => { CropImageCallBack(imagePath); - }, imageName, 4, 3); + }, imageName, 4, 3,0); //if (pageTitleId == StringId.EditScene) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs index ae70c7a..a5020be 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs @@ -1030,7 +1030,7 @@ CropImage.TakePicture((imagePath) => { CropImageCallBack(imagePath); - }, imageName, 4, 3); + }, imageName, 4, 3,0); pictureOptionView.Parent.RemoveFromParent(); }; @@ -1041,16 +1041,6 @@ btnAlbum.MouseUpEventHandler = (sender, e) => { btnAlbum.IsSelected = false; - //var pid = Guid.NewGuid(); - //CropImage.SelectPicture((imagePath) => - //{ - // if (imagePath != null) - // { - // addSceneImageView.ImagePath = imagePath.ToString(); - // scene.ImagePath = addSceneImageView.ImagePath; - // MainPage.Log("SelectPicture 瑁佸壀鍥剧墖杩斿洖璺緞: " + imagePath); - // } - //}, pid.ToString(), 4, 3); //浠庣浉鍐岄�夋嫨鍥剧墖瑁佸壀 var imageName = Guid.NewGuid().ToString(); @@ -1058,7 +1048,7 @@ CropImage.SelectPicture((imagePath) => { CropImageCallBack(imagePath); - }, imageName, 4, 3); + }, imageName, 4, 3,0); pictureOptionView.Parent.RemoveFromParent(); -- Gitblit v1.8.0