| | |
| | | dispalyView.AddChidren(contentView); |
| | | } |
| | | |
| | | |
| | | |
| | | foreach (var home in UserInfo.Current.regionList) |
| | | int iii = 0; |
| | | //while(iii<20) |
| | | { |
| | | var btnHomeName = new Button() |
| | | foreach (var home in UserInfo.Current.regionList) |
| | | { |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(40), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS.CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS.CSS_Color.MainColor, |
| | | Text = home.homeName, |
| | | TextSize = home.homeName.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize, |
| | | IsSelected = DB_ResidenceData.Instance.CurrentRegion.id == home.id, |
| | | IsMoreLines = true, |
| | | Tag = home.id |
| | | }; |
| | | contentView.AddChidren(btnHomeName); |
| | | |
| | | if (UserInfo.Current.regionList.IndexOf(home) < UserInfo.Current.regionList.Count - 1) |
| | | { |
| | | contentView.AddChidren(new Button() |
| | | if (iii > 100) |
| | | { |
| | | break; |
| | | } |
| | | iii++; |
| | | var btnHomeName = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS.CSS_Color.BackgroundColor |
| | | }); |
| | | } |
| | | Height = Application.GetRealHeight(40), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS.CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS.CSS_Color.MainColor, |
| | | Text = home.homeName, |
| | | TextSize = home.homeName.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize, |
| | | IsSelected = DB_ResidenceData.Instance.CurrentRegion.id == home.id, |
| | | IsMoreLines = true, |
| | | Tag = home.id |
| | | }; |
| | | contentView.AddChidren(btnHomeName); |
| | | |
| | | btnHomeName.MouseUpEventHandler += (senderH, en) => |
| | | { |
| | | var regionId = (string)btnHomeName.Tag; |
| | | dialog.Close(); |
| | | LoadEvent_ChangeCurHome(home); |
| | | LoadContentView(); |
| | | }; |
| | | if (UserInfo.Current.regionList.IndexOf(home) < UserInfo.Current.regionList.Count - 1) |
| | | { |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS.CSS_Color.BackgroundColor |
| | | }); |
| | | } |
| | | |
| | | btnHomeName.MouseUpEventHandler += (senderH, en) => |
| | | { |
| | | var regionId = (string)btnHomeName.Tag; |
| | | dialog.Close(); |
| | | LoadEvent_ChangeCurHome(home); |
| | | LoadContentView(); |
| | | }; |
| | | } |
| | | } |
| | | dialog.Show(); |
| | | }; |