| | |
| | | { |
| | | FrameLayout bodyView; |
| | | |
| | | VerticalRefreshLayout contentView; |
| | | VerticalScrolViewLayout contentView;//VerticalRefreshLayout |
| | | |
| | | List<IntegratedBrand_Iot> brandList; |
| | | |
| | |
| | | |
| | | public void LoadPage() |
| | | { |
| | | |
| | | |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Bind3thIotAccount)).LoadTopView(CSS_Color.MainBackgroundColor); |
| | | |
| | | var topView = new TopViewDiv(bodyView, Language.StringByID(StringId.Bind3thIotAccount)); |
| | | topView.maginY = 10; |
| | | topView.LoadTopView(CSS_Color.MainBackgroundColor); |
| | | |
| | | bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | |
| | | bodyView.AddChidren(new Button |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Y = Application.GetRealHeight(64+10), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | |
| | | Button btnTipText = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(80), |
| | | Y = Application.GetRealHeight(80+10), |
| | | Width = Application.GetRealWidth(347), |
| | | Height = Application.GetRealHeight(65), |
| | | Gravity = Gravity.CenterHorizontal, |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | bodyView.AddChidren(btnTipText); |
| | | |
| | | contentView = new VerticalRefreshLayout() |
| | | if (Language.CurrentLanguage != "Chinese") |
| | | { |
| | | Y = Application.GetRealHeight(150), |
| | | Height = Application.GetRealHeight(573), |
| | | btnTipText.Text = "Synchronize your devices on the third-party platform to on Pro for control by binding the third-party platform account to the cloud connection"; |
| | | } |
| | | |
| | | |
| | | contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(150+10), |
| | | Height = Application.GetRealHeight(573-10), |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | |
| | | |
| | | GetBindList(); |
| | | |
| | | contentView.BeginHeaderRefreshingAction = () => |
| | | { |
| | | contentView.EndHeaderRefreshing(); |
| | | GetBindList(); |
| | | }; |
| | | |
| | | LoadRow(); |
| | | |
| | | //contentView.BeginHeaderRefreshingAction = () => |
| | | //{ |
| | | // contentView.EndHeaderRefreshing(); |
| | | // GetBindList(); |
| | | //}; |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 获取绑定列表 |
| | | /// 获取列表 |
| | | /// </summary> |
| | | void GetBindList() |
| | | { |
| | |
| | | void LoadRow() |
| | | { |
| | | contentView.RemoveAll(); |
| | | bool isFrist = true; |
| | | |
| | | brandList.Add(new IntegratedBrand_Iot |
| | | { |
| | | authBrandNameCn = "Test Hdl", |
| | | authBrandNameEn = "Test Hdl", |
| | | hasAuthorization = false |
| | | }); |
| | | //brandList.Add(new IntegratedBrand_Iot |
| | | //{ |
| | | // authBrandNameCn = "Test Hdl", |
| | | // authBrandNameEn = "Test Hdl", |
| | | // hasAuthorization = false |
| | | //}); |
| | | |
| | | foreach (var brand in brandList) |
| | | { |
| | |
| | | }; |
| | | contentView.AddChidren(row); |
| | | |
| | | //if (isFrist) |
| | | //{ |
| | | // isFrist = false; |
| | | //} |
| | | //else |
| | | Button btnLine = new Button() |
| | | { |
| | | Button btnLine = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(86), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = 1, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }; |
| | | row.AddChidren(btnLine); |
| | | } |
| | | Y = Application.GetRealWidth(86), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = 1, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }; |
| | | row.AddChidren(btnLine); |
| | | |
| | | ImageView btnIcon = new ImageView() |
| | | { |
| | |
| | | }; |
| | | row.AddChidren(btnName); |
| | | //下载第三方品牌icon |
| | | //ImageUtlis.Current.Load3tyBrandIconImages(brand.brandName, brand.authrBandIconUrl, btnIcon); |
| | | |
| | | btnName.MouseUpEventHandler = (sender, e) => { |
| | | ImageUtlis.Current.Load3tyBrandIconImages(brand.brandName, brand.authBrandIconUrl, btnIcon); |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | if (brand.hasAuthorization) |
| | | { |
| | | Action unboundAction = () => |
| | |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | }; |
| | | |
| | | btnRight.MouseUpEventHandler = eventHandler; |
| | | row.MouseUpEventHandler = eventHandler; |
| | | btnName.MouseUpEventHandler = eventHandler; |
| | | btnBindTip.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | } |