From acc8caee31c4be90bd38d1af18136b0e84f6fe94 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 14:01:19 +0800
Subject: [PATCH] Merge branch 'feature/v2.7_迭代' into feature/V2.7_Google

---
 HDL_ON/UI/UI1-Login/SelectServerDialog.cs |   74 +++++++++++++++++++++++++++++--------
 1 files changed, 58 insertions(+), 16 deletions(-)

diff --git a/HDL_ON/UI/UI1-Login/SelectServerDialog.cs b/HDL_ON/UI/UI1-Login/SelectServerDialog.cs
index f2c8271..671d5b8 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)) { maginY = 10}.LoadTopView();
             //鍔犺浇鏈嶅姟鍣ㄥ尯鍩熼�夋嫨
             AddRegionalSelectionView();
             //Show
@@ -56,8 +60,9 @@
 
             VerticalScrolViewLayout VerticalScrolViewMiddle = new VerticalScrolViewLayout()
             {
-                Y = Application.GetRealHeight(64),
-                Height = bodyView.Height - Application.GetRealHeight(64),
+                Y = Application.GetRealHeight(84),
+                Height = bodyView.Height - Application.GetRealHeight(84),
+                ScrollEnabled = false,
             };
             bodyView.AddChidren(VerticalScrolViewMiddle);
 
@@ -86,6 +91,13 @@
                                     {
                                         AddRowView(data, VerticalScrolViewMiddle);
                                     }
+                                    //if (string.IsNullOrEmpty(OnAppConfig.Instance.RequestHttpsHost))
+                                    //{
+                                    //    if (Language.CurrentLanguage != "Chinese")
+                                    //    {
+                                    //        OnAppConfig.Instance.RequestHttpsHost = dataList.Find((obj)=>obj.regionUrl.Contains)
+                                    //    }
+                                    //}
                                 }
                             }
                         });
@@ -124,27 +136,59 @@
         {
             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();
@@ -155,12 +199,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;
+            //}
         }
     }
 }

--
Gitblit v1.8.0