wxr
2024-05-20 efcffde735fa65ae34bae0bcc86313b74ed0e36c
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPage.cs
@@ -34,83 +34,87 @@
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(StringId.AddMember)).LoadTopView();
            var topView = new TopViewDiv(bodyView, Language.StringByID(StringId.AddMember));
            topView.maginY = 10;
            topView.LoadTopView();
            var btnMemberName = new Button()
            {
                Y = Application.GetRealHeight(70+10),
                X = Application.GetRealWidth(16),
                Height = Application.GetRealHeight(32),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.MemberName,
            };
            bodyView.AddChidren(btnMemberName);
            etMemberName = new EditText()
            {
                Y = btnMemberName.Bottom,
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(356),
                Height = Application.GetRealHeight(40),
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                PlaceholderText = Language.StringByID(StringId.PleaseEnterContent),
                PlaceholderTextColor = CSS_Color.PromptingColor2
            };
            bodyView.AddChidren(etMemberName);
            var btnLine = new Button()
            {
                Y = etMemberName.Bottom,
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.DividingLineColor,
            };
            bodyView.AddChidren(btnLine);
            var btnTitle = new Button()
            {
                Y = btnLine.Bottom + Application.GetRealHeight(20),
                X = Application.GetRealWidth(16),
                Height = Application.GetRealHeight(32),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.MemberAccount,
            };
            bodyView.AddChidren(btnTitle);
            etMemberAccount = new EditText()
            {
                Y = btnTitle.Bottom,
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(356),
                Height = Application.GetRealHeight(40),
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                PlaceholderText = Language.StringByID(StringId.PleaseEnterContent),
                PlaceholderTextColor = CSS_Color.PromptingColor2
            };
            bodyView.AddChidren(etMemberAccount);
            var btnLine1 = new Button()
            {
                Y = etMemberAccount.Bottom,
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.DividingLineColor,
            };
            bodyView.AddChidren(btnLine1);
            int btnAddmemberY = 30;
            if (Entity.DB_ResidenceData.Instance.SupportFacePass)
            {
                var btnMemberName = new Button()
                {
                    Y = Application.GetRealHeight(70),
                    X = Application.GetRealWidth(16),
                    Height = Application.GetRealHeight(32),
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.TextFontSize,
                    TextAlignment = TextAlignment.CenterLeft,
                    TextID = StringId.MemberName,
                };
                bodyView.AddChidren(btnMemberName);
                etMemberName = new EditText()
                {
                    Y = btnMemberName.Bottom,
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(356),
                    Height = Application.GetRealHeight(40),
                    TextColor = CSS_Color.TextualColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextAlignment = TextAlignment.CenterLeft,
                    PlaceholderText = Language.StringByID(StringId.PleaseEnterContent),
                    PlaceholderTextColor = CSS_Color.PromptingColor2
                };
                bodyView.AddChidren(etMemberName);
                var btnLine = new Button()
                {
                    Y = etMemberName.Bottom,
                    Gravity = Gravity.CenterHorizontal,
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(1),
                    BackgroundColor = CSS_Color.DividingLineColor,
                };
                bodyView.AddChidren(btnLine);
                var btnTitle = new Button()
                {
                    Y = btnLine.Bottom + Application.GetRealHeight(20),
                    X = Application.GetRealWidth(16),
                    Height = Application.GetRealHeight(32),
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.TextFontSize,
                    TextAlignment = TextAlignment.CenterLeft,
                    TextID = StringId.MemberAccount,
                };
                bodyView.AddChidren(btnTitle);
                etMemberAccount = new EditText()
                {
                    Y = btnTitle.Bottom,
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(356),
                    Height = Application.GetRealHeight(40),
                    TextColor = CSS_Color.TextualColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextAlignment = TextAlignment.CenterLeft,
                    PlaceholderText = Language.StringByID(StringId.PleaseEnterContent),
                    PlaceholderTextColor = CSS_Color.PromptingColor2
                };
                bodyView.AddChidren(etMemberAccount);
                var btnLine1 = new Button()
                {
                    Y = etMemberAccount.Bottom,
                    Gravity = Gravity.CenterHorizontal,
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(1),
                    BackgroundColor = CSS_Color.DividingLineColor,
                };
                bodyView.AddChidren(btnLine1);
                btnAddmemberY = 203;
                #region 人脸管理
                var btnMemberFaceTitle = new Button()
                {
@@ -190,7 +194,7 @@
                        TextAlignment = TextAlignment.CenterLeft,
                        TextColor = CSS_Color.TextualColor,
                        TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                        Text = "    为保护您的个人隐私权益,特向您通知并申请明确同意授权。请你仔细阅读",
                        TextID = StringId.FaceProTipText1,
                        IsMoreLines = true,
                    };
                    contentView.AddChidren(btnMsg);
@@ -204,9 +208,10 @@
                        TextAlignment = TextAlignment.CenterLeft,
                        TextColor = CSS_Color.MainColor,
                        TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                        Text = "    《On Pro人脸信息采集协议》",
                        TextID = StringId.FaceProTipText2,
                        IsMoreLines = true,
                    };
                    contentView.AddChidren(btnMsg1);
                    Button btnMsg2 = new Button()
@@ -218,7 +223,7 @@
                        TextAlignment = TextAlignment.CenterLeft,
                        TextColor = CSS_Color.TextualColor,
                        TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                        Text = "    若同意该协议,请点击【同意】按键,表示您已经理解并同意人脸信息采集协议。",
                        TextID = StringId.FaceProTipText3,
                        IsMoreLines = true,
                    };
                    contentView.AddChidren(btnMsg2);
@@ -276,11 +281,12 @@
                        {
                            url = "https://developer.hdlcontrol.com/Face information collection protocol.html";
                        }
                        new WebViewDialog().LoadPage("人脸信息采集协议", url);
                        new WebViewDialog().LoadPage(Language.StringByID(StringId.GetFaceProtocol), url);
                        dialog.Close();
                    };
                    btnConfirm.MouseUpEventHandler = (sender2, e2) => {
                    btnConfirm.MouseUpEventHandler = (sender2, e2) =>
                    {
                        dialog.Close();
                        OnAppConfig.Instance.FaceManagementTip = true;
                        OnAppConfig.Instance.SaveConfig();
@@ -291,104 +297,37 @@
                btnAddFace.MouseUpEventHandler = eFaceHandler;
                #endregion
                btnAddMember = new Button()
                {
                    Gravity = Gravity.CenterHorizontal,
                    Y = btnAddFace.Bottom + Application.GetRealHeight(30),
                    Width = Application.GetRealWidth(220),
                    Height = Application.GetRealWidth(44),
                    Radius = (uint)Application.GetRealWidth(22),
                    BorderWidth = 0,
                    BorderColor = 0x00000000,
                    BackgroundColor = CSS_Color.MainColor,
                    TextColor = CSS_Color.MainBackgroundColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    IsBold = true,
                    TextAlignment = TextAlignment.Center,
                    TextID = StringId.Confirm,
                };
                bodyView.AddChidren(btnAddMember);
                btnScan = new Button()
                {
                    Y = btnTitle.Bottom,
                    Width = Application.GetRealWidth(40),
                    Height = Application.GetRealWidth(40),
                    X = Application.GetRealWidth(310),
                    UnSelectedImagePath = "Public/Scan.png"
                };
                bodyView.AddChidren(btnScan);
            }
            else
            btnAddMember = new Button()
            {
                var btnTitle2 = new Button()
                {
                    Y = Application.GetRealHeight(70),
                    X = Application.GetRealWidth(16),
                    Height = Application.GetRealHeight(32),
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.TextFontSize,
                    TextAlignment = TextAlignment.CenterLeft,
                    TextID = StringId.NewMemberAccount,
                };
                bodyView.AddChidren(btnTitle2);
                Gravity = Gravity.CenterHorizontal,
                Y = btnLine1.Bottom + Application.GetRealHeight(btnAddmemberY),
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealWidth(44),
                Radius = (uint)Application.GetRealWidth(22),
                BorderWidth = 0,
                BorderColor = 0x00000000,
                BackgroundColor = CSS_Color.MainColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                IsBold = true,
                TextAlignment = TextAlignment.Center,
                TextID = StringId.Confirm,
            };
            bodyView.AddChidren(btnAddMember);
                etMemberAccount = new EditText()
                {
                    Y = btnTitle2.Bottom,
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(356),
                    Height = Application.GetRealHeight(40),
                    TextColor = CSS_Color.TextualColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextAlignment = TextAlignment.CenterLeft,
                    PlaceholderText = Language.StringByID(StringId.PleaseEnterContent),
                    PlaceholderTextColor = CSS_Color.PromptingColor2
                };
                bodyView.AddChidren(etMemberAccount);
                var btnLine = new Button()
                {
                    Y = etMemberAccount.Bottom,
                    Gravity = Gravity.CenterHorizontal,
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(1),
                    BackgroundColor = CSS_Color.DividingLineColor,
                };
                bodyView.AddChidren(btnLine);
            btnScan = new Button()
            {
                Y = btnTitle.Bottom,
                Width = Application.GetRealWidth(40),
                Height = Application.GetRealWidth(40),
                X = Application.GetRealWidth(310),
                UnSelectedImagePath = "Public/Scan.png"
            };
            bodyView.AddChidren(btnScan);
                btnAddMember = new Button()
                {
                    Gravity = Gravity.CenterHorizontal,
                    Y = Application.GetRealHeight(244),
                    Width = Application.GetRealWidth(220),
                    Height = Application.GetRealWidth(44),
                    Radius = (uint)Application.GetRealWidth(22),
                    BorderWidth = 0,
                    BorderColor = 0x00000000,
                    BackgroundColor = CSS_Color.MainColor,
                    TextColor = CSS_Color.MainBackgroundColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    IsBold = true,
                    TextAlignment = TextAlignment.Center,
                    TextID = StringId.Confirm,
                };
                bodyView.AddChidren(btnAddMember);
                btnScan = new Button()
                {
                    Y = btnAddMember.Bottom,
                    Height = Application.GetRealHeight(44),
                    TextAlignment = TextAlignment.Center,
                    TextColor = CSS_Color.MainColor,
                    TextSize = CSS_FontSize.TextFontSize,
                    TextID = StringId.ScanQRCoden,
                };
                bodyView.AddChidren(btnScan);
            }
            LoadEventList();
        }