From e08a444a9d7acea0cf39f50d22d29179f6a59292 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 01 十二月 2020 09:37:11 +0800
Subject: [PATCH] 2020-12-1
---
HDL_ON/UI/UI1-Login/SelectServerDialog.cs | 40 +++++++++++++++-------------------------
1 files changed, 15 insertions(+), 25 deletions(-)
diff --git a/HDL_ON/UI/UI1-Login/SelectServerDialog.cs b/HDL_ON/UI/UI1-Login/SelectServerDialog.cs
index 5565817..2b262db 100644
--- a/HDL_ON/UI/UI1-Login/SelectServerDialog.cs
+++ b/HDL_ON/UI/UI1-Login/SelectServerDialog.cs
@@ -32,9 +32,9 @@
}
- /// <summary>
- ///
- /// </summary>
+ /// <summary>
+ ///
+ /// </summary>
public void LoadPage()
{
bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
@@ -61,24 +61,11 @@
};
bodyView.AddChidren(VerticalScrolViewMiddle);
- //var TipView = new Button()
- //{
- // Y = bodyView.Height - Application.GetRealHeight(60),
- // Width = LayoutParams.MatchParent,
- // Height = Application.GetRealHeight(60),
- // BackgroundColor = 0xFFFFFFE0,
- // TextSize = 11,
- // //Text = "璇烽�夋嫨娉ㄥ唽鐨勫尯鍩�",
- // //TextID = R.MyInternationalizationString.SelectRegisteredArea,
- // TextColor = 0xFF1F1F1F,
- // IsMoreLines = true
- //};
- //bodyView.AddChidren(TipView);
-
var waitPage = new Loading();
waitPage.Start("Please wait...");
- System.Threading.Tasks.Task.Run(() => {
+ System.Threading.Tasks.Task.Run(() =>
+ {
try
{
var dataList = new List<GlobalRegionListRes>();
@@ -86,7 +73,8 @@
var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_GlobalRegionList, requestJson, HttpUtil.GlobalRequestHttpsHost);
if (revertObj.Code == StateCode.SUCCESS)
{
- Application.RunOnMainThread(() => {
+ Application.RunOnMainThread(() =>
+ {
var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GlobalRegionListRes>>(revertObj.Data.ToString());
if (responseDataObj != null)
{
@@ -109,11 +97,12 @@
}
catch
{
-
+
}
finally
{
- Application.RunOnMainThread(() => {
+ Application.RunOnMainThread(() =>
+ {
waitPage.Hide();
});
}
@@ -134,14 +123,13 @@
};
VerticalScrolViewMiddle.AddChidren(rowView);
- var urlBtn = new Button() {
+ var urlBtn = new Button()
+ {
X = Application.GetRealWidth(16),
Height = rowView.Height,
Width = Application.GetRealWidth(200),
TextSize = CSS_FontSize.SubheadingFontSize,
TextColor = CSS_Color.FirstLevelTitleColor,
- SelectedTextColor = CSS_Color.MainColor,
- //Gravity = Gravity.CenterLeft,
TextAlignment = TextAlignment.CenterLeft
};
rowView.AddChidren(urlBtn);
@@ -150,7 +138,8 @@
//rowView.AddChidren(lineView);
//lineView.Y = rowView.Height - lineView.Height;
- EventHandler<MouseEventArgs> eHandler = (sender, e) => {
+ EventHandler<MouseEventArgs> eHandler = (sender, e) =>
+ {
UserInfo.Current.RequestHttpsHost = mGlobalRegion.regionUrl;
UserInfo.Current.GlobalRegion = mGlobalRegion;
UserInfo.Current.SaveUserInfo();
@@ -162,6 +151,7 @@
urlBtn.MouseUpEventHandler += eHandler;
urlBtn.Text = mGlobalRegion.regionName;
+
if (mGlobalRegion.regionUrl == UserInfo.Current.RequestHttpsHost)
{
urlBtn.TextColor = CSS_Color.MainColor;
--
Gitblit v1.8.0