| | |
| | | /// </summary> |
| | | Action selectAction; |
| | | |
| | | Button btnConfrim; |
| | | |
| | | GlobalRegionListRes selectedRegion; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | 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 |
| | |
| | | |
| | | 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); |
| | | |
| | |
| | | } |
| | | }); |
| | | |
| | | //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> |
| | |
| | | { |
| | | 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(); |
| | |
| | | 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; |
| | | //} |
| | | } |
| | | } |
| | | } |