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 +++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 79 insertions(+), 16 deletions(-)

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;
+            //}
         }
     }
 }

--
Gitblit v1.8.0