wxr
2022-08-17 d6578b10542226650e263815dea75e598a7090f9
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_AuthorizedPage.cs
@@ -2,6 +2,7 @@
using Shared;
using HDL_ON.Entity;
using HDL_ON.DAL.Server;
using HDL_ON.UI.CSS;
namespace HDL_ON.UI
{
@@ -32,9 +33,99 @@
                UnsubscribeAsync3tyIotbind();
                Application.RunOnMainThread(() =>
                {
                    http.Search3tyIotDevice(brand_Iot.companyId);
                    //http.Search3tyIotDevice(brand_Iot.companyId);
                    boudedAction?.Invoke();
                    dd.Close();
                    {
                        Dialog dialog = new Dialog()
                        {
                            BackgroundColor = CSS_Color.DialogTransparentColor1,
                        };
                        FrameLayout contentView = new FrameLayout()
                        {
                            Gravity = Gravity.Center,
                            Width = Application.GetRealWidth(305),
                            Height = Application.GetRealHeight(180),
                            BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
                            BorderColor = 0x00000000,
                            BorderWidth = 0,
                            Radius = (uint)Application.GetMinRealAverage(10),
                        };
                        dialog.AddChidren(contentView);
                        Button btnTitle = new Button()
                        {
                            Gravity = Gravity.CenterHorizontal,
                            Y = Application.GetRealHeight(10),
                            Height = Application.GetRealHeight(38),
                            TextAlignment = TextAlignment.Center,
                            IsBold = true,
                            TextColor = 0xFF222222,
                            TextSize = CSS_FontSize.SubheadingFontSize,
                            TextID = StringId.Tip
                        };
                        contentView.AddChidren(btnTitle);
                        Button btnMsg = new Button()
                        {
                            Gravity = Gravity.CenterHorizontal,
                            Height = Application.GetRealHeight(70),
                            Y = Application.GetRealHeight(55),
                            TextAlignment = TextAlignment.TopCenter,
                            TextColor = CSS_Color.FirstLevelTitleColor,
                            TextSize = CSS_FontSize.SubheadingFontSize,
                            Padding = new Padding(0, Application.GetRealWidth(16), 0, Application.GetRealWidth(16)),
                            Text = "账户绑定成功,您可以继续完成设备关联操作",
                            IsMoreLines = true,
                        };
                        contentView.AddChidren(btnMsg);
                        if(Language.CurrentLanguage != "Chinese")
                        {
                            btnMsg.Text = "Account binding is successful.You can continue to complete the device association operation";
                        }
                        Button btnLine = new Button()
                        {
                            Y = Application.GetRealHeight(125),
                            Height = Application.GetRealHeight(1),
                            BackgroundColor = CSS.CSS_Color.DividingLineColor,
                        };
                        contentView.AddChidren(btnLine);
                        Button btnConfirm = new Button()
                        {
                            Y = btnLine.Bottom,
                            Height = Application.GetRealHeight(55),
                            TextAlignment = TextAlignment.Center,
                            TextColor = CSS_Color.MainColor,
                            TextSize = CSS_FontSize.SubheadingFontSize,
                            SelectedTextColor = CSS_Color.MainBackgroundColor,
                            SelectedBackgroundColor = CSS_Color.MainColor,
                            TextID = StringId.Confirm,
                        };
                        btnConfirm.SetCornerWithSameRadius(Application.GetMinRealAverage(10), HDLUtils.RectCornerBottomLeft);
                        btnConfirm.SetCornerWithSameRadius(Application.GetMinRealAverage(10), HDLUtils.RectCornerBottomRight);
                        contentView.AddChidren(btnConfirm);
                        dialog.Show();
                        btnConfirm.MouseDownEventHandler += (sender, e) =>
                        {
                            btnConfirm.IsSelected = true;
                        };
                        btnConfirm.MouseUpEventHandler += (sender, e) =>
                        {
                            dialog.Close();
                        };
                    }
                });
            };
            SubscribeAsync3tyIotbind();
@@ -79,17 +170,16 @@
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 搜索第三方设备
        /// </summary>
        private void SearchDevice()
        {
            var pack = http.Search3tyIotDevice(brand_Iot.companyId);
            if(pack!= null)
            {
            }
        }
        ///// <summary>
        ///// 搜索第三方设备
        ///// </summary>
        //private void SearchDevice()
        //{
        //    var pack = http.Search3tyIotDevice(brand_Iot.companyId);
        //    if(pack!= null)
        //    {
        //    }
        //}
        /// <summary>
        /// 获取第三方功能列表