| | |
| | | public void LoadPage(IntegratedBrand_Iot brand_Iot) |
| | | { |
| | | |
| | | |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Bind3thIotAccount)).LoadTopView(CSS_Color.MainBackgroundColor); |
| | | var topView = new TopViewDiv(bodyView, brand_Iot.brandName); |
| | | topView.maginY = 10; |
| | | topView.LoadTopView(CSS_Color.MainBackgroundColor); |
| | | |
| | | bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Y = Application.GetRealHeight(64+10), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | Height = Application.GetRealHeight(667 - 124) |
| | | Height = Application.GetRealHeight(667 - 124 - 10) |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | |
| | | TextSize = 21, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | IsBold = true, |
| | | Text = "关于账号绑定的声明" |
| | | TextID = StringId.AboutBindAcountTip, |
| | | }; |
| | | contentView.AddChidren(btnTipTitle); |
| | | |
| | |
| | | "如需终止以上信息的收集与处理,您可以在“我的”> “绑定第三方账户”>“解除”" |
| | | }; |
| | | contentView.AddChidren(btnTipText); |
| | | if (Language.CurrentLanguage != "Chinese") |
| | | { |
| | | btnTipText.Text = $"account binding brand: {brand_Iot.brandName} (hereinafter referred to as the third party brand)" + "\r\n" + "\r\n" + |
| | | "After you bind the account of the third-party brand, you will authorize 'on Pro' to use your account of the third-party to jointly manage the device. On Pro will also automatically synchronize the device you added in the third-party brand." + "\r\n" + "\r\n" + |
| | | "To realize the device control function, this application will obtain the following data from a third party:" + "\r\n" + "\r\n" + |
| | | "1. List of some devices added on the third-party brand for intelligent control in on Pro;" + "\r\n" + "\r\n" + |
| | | "2. Equipment and network information, including equipment identifier, MAC address and equipment serial number, is used to identify the currently working equipment and perform equipment control functions." + "\r\n" + "\r\n" + |
| | | "If you do not agree with our collection of the above information, you will not be able to manage third-party branded devices." + "\r\n" + "\r\n" + |
| | | "To terminate the collection and processing of the above information, you can click my > bind third party account > cancel"; |
| | | } |
| | | |
| | | |
| | | var optionView = new FrameLayout() |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | Text = "返回", |
| | | TextID= StringId.fanhui, |
| | | Radius = (uint)Application.GetRealHeight(22) |
| | | }; |
| | | optionView.AddChidren(btnCannel); |
| | |
| | | BackgroundColor= CSS_Color.MainColor, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | Text = "同意授权", |
| | | TextID = StringId.Agree, |
| | | Radius = (uint)Application.GetRealHeight(22) |
| | | }; |
| | | optionView.AddChidren(btnComfirm); |
| | | |
| | | |
| | | if (!brand_Iot.hasAuthorization) |
| | | { |
| | |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | var page = new Iot_AuthorizedPage(brand_Iot,action); |
| | | page.LoadView(); |
| | | var page2 = new Iot_AuthorizedPage(brand_Iot,action); |
| | | page2.LoadView(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | btnComfirm.Text = "解除授权"; |
| | | btnComfirm.TextID = StringId.Cancel; |
| | | btnComfirm.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | Dialog dialog = new Dialog() |
| | |
| | | BackgroundColor = CSS_Color.DialogTransparentColor1, |
| | | }; |
| | | |
| | | FrameLayout contentView = new FrameLayout() |
| | | FrameLayout contentView2 = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Width = Application.GetRealWidth(305), |
| | |
| | | BorderWidth = 0, |
| | | Radius = (uint)Application.GetMinRealAverage(10), |
| | | }; |
| | | dialog.AddChidren(contentView); |
| | | dialog.AddChidren(contentView2); |
| | | |
| | | Button btnMsg = new Button() |
| | | { |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | Padding = new Padding(0,Application.GetRealWidth(16),0,Application.GetRealWidth(16)), |
| | | Text = "撤销授权后,该品牌关联在On Pro中的设备将全部被解绑,相关使用信息合设备值也将失效", |
| | | TextID = StringId.RevokeAuthorizationTip, |
| | | IsMoreLines = true, |
| | | }; |
| | | contentView.AddChidren(btnMsg); |
| | | contentView2.AddChidren(btnMsg); |
| | | |
| | | Button btnLine = new Button() |
| | | { |
| | |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS.CSS_Color.DividingLineColor, |
| | | }; |
| | | contentView.AddChidren(btnLine); |
| | | contentView2.AddChidren(btnLine); |
| | | |
| | | Button btnConfirm = new Button() |
| | | { |
| | |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | SelectedTextColor = CSS_Color.MainBackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | Text = "确定撤回授权", |
| | | TextID = StringId.ConfirmRevocationOfAuthorization, |
| | | }; |
| | | btnConfirm.SetCornerWithSameRadius(Application.GetMinRealAverage(10), HDLUtils.RectCornerBottomLeft); |
| | | btnConfirm.SetCornerWithSameRadius(Application.GetMinRealAverage(10), HDLUtils.RectCornerBottomRight); |
| | | contentView.AddChidren(btnConfirm); |
| | | contentView2.AddChidren(btnConfirm); |
| | | |
| | | dialog.Show(); |
| | | |
| | | btnConfirm.MouseDownEventHandler += (sender, e) => |
| | | btnConfirm.MouseDownEventHandler += (sender2, e2) => |
| | | { |
| | | btnConfirm.IsSelected = true; |
| | | }; |
| | | btnConfirm.MouseUpEventHandler += (sender, e) => |
| | | btnConfirm.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | var http = new HttpServerRequest(); |
| | | var waitPage = new Loading(); |
| | | this.AddChidren(waitPage); |
| | | dialog.Close(); |
| | | waitPage.Start(""); |
| | | new System.Threading.Thread(() => |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | dialog.Close(); |
| | | new Alert("", "操作失败", "").Show(); |
| | | new Alert("", Language.StringByID(StringId.OperationFailed), "").Show(); |
| | | } |
| | | } |
| | | catch { } |