| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public SelectServerDialog() |
| | | public SelectServerDialog(Action selectAction) |
| | | { |
| | | bodyView = new FrameLayout(); |
| | | this.selectAction = selectAction; |
| | | } |
| | | |
| | | |
| | |
| | | /// </summary> |
| | | public void LoadPage() |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | this.AddChidren(bodyView); |
| | | new TopViewDiv(this, bodyView, Language.StringByID(StringId.SelectCountryOrRegion)).LoadTopView(); |
| | | |
| | | //加载顶部菜单栏 |
| | | new TopViewDiv(this, bodyView, Language.StringByID(StringId.PleaseSelectCountryOrRegion)).LoadTopView(); |
| | | //加载服务器区域选择 |
| | | AddRegionalSelectionView(); |
| | | //Show |
| | | this.Show(); |
| | | } |
| | | |
| | | |
| | |
| | | /// <param name="VerticalScrolViewMiddle"></param> |
| | | void AddRowView(GlobalRegionListRes mGlobalRegion, VerticalScrolViewLayout VerticalScrolViewMiddle) |
| | | { |
| | | var rowView = new RowLayout() |
| | | var rowView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | |
| | | var urlBtn = new Button() { |
| | | X = Application.GetRealWidth(16), |
| | | Height = rowView.Height, |
| | | Width = Application.GetRealWidth(200), |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Gravity = Gravity.CenterLeft |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | //Gravity = Gravity.CenterLeft, |
| | | TextAlignment = TextAlignment.CenterLeft |
| | | }; |
| | | rowView.AddChidren(urlBtn); |
| | | |
| | | var lineView = new LineView(); |
| | | rowView.AddChidren(lineView); |
| | | lineView.Y = rowView.Height - lineView.Height; |
| | | //var lineView = new LineView(); |
| | | //rowView.AddChidren(lineView); |
| | | //lineView.Y = rowView.Height - lineView.Height; |
| | | |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => { |
| | | UserInfo.Current.RequestHttpsHost = mGlobalRegion.regionUrl; |
| | |
| | | rowView.MouseUpEventHandler += eHandler; |
| | | urlBtn.MouseUpEventHandler += eHandler; |
| | | |
| | | |
| | | urlBtn.Text = mGlobalRegion.regionName; |
| | | if (mGlobalRegion.regionUrl == UserInfo.Current.RequestHttpsHost) |
| | | { |
| | | urlBtn.TextColor = CSS_Color.MainColor; |