wxr
2023-08-23 96e9ff2e5a54f54cdbb6b8b2f049fdf6a837de3c
OnPro/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -312,8 +312,7 @@
            #region 住宅信息区域
            if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare
                && DB_ResidenceData.Instance.GatewayType == 1
                && DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl)
                && DB_ResidenceData.Instance.GatewayType == 1)
            {
                residenceInfoView = new FrameLayout()
                {
@@ -603,52 +602,6 @@
                    residenceAddFunctionView.AddChidren(btnResidenceAddFunctionText);
                    #endregion
                    if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl)
                    {
                        residenceFunctionCount++;
                        #region ---组合调光
                        var faceManagementView = new FrameLayout()
                        {
                            X = Application.GetRealWidth(28 - 24),
                            Y = residenceManageView.Bottom,
                            Width = Application.GetRealWidth(64 + 48),
                            Height = Application.GetRealWidth(64),
                        };
                        residenceInfoView.AddChidren(faceManagementView);
                        var btnFaceManagementIcon = new Button
                        {
                            Gravity = Gravity.CenterHorizontal,
                            Y = Application.GetRealHeight(5),
                            Width = Application.GetMinRealAverage(30),
                            Height = Application.GetMinRealAverage(30),
                            UnSelectedImagePath = "PersonalCenter/CombinedDimmingIcon.png",
                        };
                        faceManagementView.AddChidren(btnFaceManagementIcon);
                        var btnFaceManagementText = new Button()
                        {
                            Y = btnResidenceManageIcon.Bottom,
                            Height = Application.GetRealHeight(29),
                            TextID = StringId.GroupControl,
                            TextAlignment = TextAlignment.Center,
                            TextColor = CSS_Color.FirstLevelTitleColor,
                            TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                            IsMoreLines = true,
                        };
                        faceManagementView.AddChidren(btnFaceManagementText);
                        EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                        {
                            var page = new CombinedDimmingListPage();
                            MainPage.BasePageView.AddChidren(page);
                            page.LoadPage();
                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        };
                        faceManagementView.MouseUpEventHandler = eventHandler;
                        btnFaceManagementText.MouseUpEventHandler = eventHandler;
                        btnFaceManagementIcon.MouseUpEventHandler = eventHandler;
                        #endregion
                    }
                }
            }
            else
@@ -696,162 +649,11 @@
                    //residenceArmView.AddChidren(btnResidenceArmText);
                    #endregion
                }
                #region F3阶段
                #region ---数据备份区域
                //residenceDataBackupView = new FrameLayout()
                //{
                //    X = residenceArmView.Right,
                //    Y = Application.GetRealHeight(68),
                //    Width = Application.GetRealWidth(64 + 48),
                //    Height = Application.GetRealWidth(64),
                //};
                //residenceInfoView.AddChidren(residenceDataBackupView);
                //btnResidenceDataBackupIcon = new Button
                //{
                //    Gravity = Gravity.CenterHorizontal,
                //    Y = Application.GetRealHeight(5),
                //    Width = Application.GetMinRealAverage(30),
                //    Height = Application.GetMinRealAverage(30),
                //    UnSelectedImagePath = "PersonalCenter/ResidenceDataBackupIcon.png",
                //};
                //residenceDataBackupView.AddChidren(btnResidenceDataBackupIcon);
                //btnResidenceDataBackupText = new Button()
                //{
                //    Y = btnResidenceDataBackupIcon.Bottom,
                //    Height = Application.GetRealHeight(29),
                //    TextID = StringId.DataBackup,
                //    TextAlignment = TextAlignment.Center,
                //    TextColor = CSS_Color.FirstLevelTitleColor,
                //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                //};
                //residenceDataBackupView.AddChidren(btnResidenceDataBackupText);
                #endregion
                #region ---辅助功能区域
                //residenceAuxiliaryFunctionView = new FrameLayout()
                //{
                //    X = residenceArmView.Right,
                //    Y = Application.GetRealHeight(68),
                //    Width = Application.GetRealWidth(64 + 48),
                //    Height = Application.GetRealWidth(64),
                //};
                //residenceInfoView.AddChidren(residenceAuxiliaryFunctionView);
                //btnResidenceAuxiliaryFunctionIcon = new Button
                //{
                //    Gravity = Gravity.CenterHorizontal,
                //    Y = Application.GetRealHeight(5),
                //    Width = Application.GetMinRealAverage(30),
                //    Height = Application.GetMinRealAverage(30),
                //    UnSelectedImagePath = "PersonalCenter/AuxiliaryFunctionIcon.png",
                //};
                //residenceAuxiliaryFunctionView.AddChidren(btnResidenceAuxiliaryFunctionIcon);
                //btnResidenceAuxiliaryFunctionText = new Button()
                //{
                //    Y = btnResidenceAuxiliaryFunctionIcon.Bottom,
                //    Height = Application.GetRealHeight(29),
                //    TextID = StringId.AuxiliaryFunction,
                //    TextAlignment = TextAlignment.Center,
                //    TextColor = CSS_Color.FirstLevelTitleColor,
                //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                //};
                //residenceAuxiliaryFunctionView.AddChidren(btnResidenceAuxiliaryFunctionText);
                #endregion
                #endregion
            }
            #endregion
            #endregion
            #region F3阶段
            #region 软件设置区域
            //contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
            //softSettingView = new FrameLayout()
            //{
            //    Gravity = Gravity.CenterHorizontal,
            //    Width = Application.GetRealWidth(343),
            //    Height = Application.GetRealWidth(88),
            //    BackgroundColor = CSS_Color.MainBackgroundColor,
            //    Radius = (uint)Application.GetRealHeight(12),
            //    BorderColor = 0x00FFFFFF,
            //    BorderWidth = 0,
            //};
            //contentView.AddChidren(softSettingView);
            //Button btnNightViewModeIcon = new Button()
            //{
            //    X = Application.GetRealWidth(12),
            //    Y = Application.GetRealHeight(10),
            //    Width = Application.GetMinRealAverage(24),
            //    Height = Application.GetMinRealAverage(24),
            //    UnSelectedImagePath = "PersonalCenter/NightViewIcon.png",
            //};
            //softSettingView.AddChidren(btnNightViewModeIcon);
            //btnNightViewModeText = new Button()
            //{
            //    X = Application.GetRealWidth(48),
            //    Width = Application.GetRealWidth(270),
            //    Height = Application.GetRealWidth(44),
            //    TextID = StringId.NightView,
            //    TextColor = CSS_Color.FirstLevelTitleColor,
            //    TextSize = CSS_FontSize.TextFontSize,
            //    TextAlignment = TextAlignment.CenterLeft,
            //};
            //softSettingView.AddChidren(btnNightViewModeText);
            //Button btnNightViewModeRight = new Button()
            //{
            //    X = Application.GetRealWidth(315),
            //    Y = Application.GetRealWidth(14),
            //    Width = Application.GetMinRealAverage(16),
            //    Height = Application.GetMinRealAverage(16),
            //    UnSelectedImagePath = "Public/Right.png",
            //};
            //softSettingView.AddChidren(btnNightViewModeRight);
            //var btnSoftSettingViewLine = new Button()
            //{
            //    X = Application.GetRealWidth(48),
            //    Y = btnNightViewModeText.Bottom,
            //    Height = Application.GetRealHeight(1),
            //    BackgroundColor = CSS_Color.DividingLineColor
            //};
            //softSettingView.AddChidren(btnSoftSettingViewLine);
            //Button btnGeneralSettingsIcon = new Button()
            //{
            //    X = Application.GetRealWidth(12),
            //    Y = Application.GetRealWidth(54),
            //    Width = Application.GetMinRealAverage(24),
            //    Height = Application.GetMinRealAverage(24),
            //    UnSelectedImagePath = "PersonalCenter/GeneralSettingsIcon.png",
            //};
            //softSettingView.AddChidren(btnGeneralSettingsIcon);
            //btnGeneralSettingsText = new Button()
            //{
            //    X = Application.GetRealWidth(48),
            //    Y = btnSoftSettingViewLine.Bottom,
            //    Width = Application.GetRealWidth(270),
            //    Height = Application.GetRealWidth(44),
            //    TextID = StringId.GeneralSettings,
            //    TextColor = CSS_Color.FirstLevelTitleColor,
            //    TextAlignment = TextAlignment.CenterLeft,
            //    TextSize = CSS_FontSize.TextFontSize
            //};
            //softSettingView.AddChidren(btnGeneralSettingsText);
            //Button btnGeneralSettingsRight = new Button()
            //{
            //    X = Application.GetRealWidth(315),
            //    Y = Application.GetRealWidth(58),
            //    Width = Application.GetMinRealAverage(16),
            //    Height = Application.GetMinRealAverage(16),
            //    UnSelectedImagePath = "Public/Right.png",
            //};
            //softSettingView.AddChidren(btnGeneralSettingsRight);
            #endregion
            #endregion
            #region 智能音箱、获取支持、关于On Pro 等菜单列表
            contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
@@ -871,234 +673,6 @@
            contentView.AddChidren(supportView);
            int supportViewCellCount = 1;
            #region 智能音箱
            if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
            {
                supportViewCellCount++;
                //supportView 加高 显示3行 3*44
                supportView.Height = Application.GetRealWidth(supportViewCellCount * 44);
                FrameLayout smartSpeakerView = new FrameLayout()
                {
                    Height = Application.GetRealWidth(44),
                };
                supportView.AddChidren(smartSpeakerView);
                //住宅为当前账号才显示智能音箱入口
                Button btnSmartSpeakerIcon = new Button()
                {
                    X = Application.GetRealWidth(12),
                    Y = Application.GetRealWidth(10),
                    Width = Application.GetMinRealAverage(24),
                    Height = Application.GetMinRealAverage(24),
                    UnSelectedImagePath = "PersonalCenter/SmartSpeaker.png",
                };
                smartSpeakerView.AddChidren(btnSmartSpeakerIcon);
                btnSmartSpeakerText = new Button()
                {
                    X = Application.GetRealWidth(48),
                    Width = Application.GetRealWidth(270),
                    Height = Application.GetRealWidth(44),
                    TextID = StringId.SmartSpeaker,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextAlignment = TextAlignment.CenterLeft,
                    TextSize = CSS_FontSize.TextFontSize
                };
                smartSpeakerView.AddChidren(btnSmartSpeakerText);
                Button btnSmartSpeakerRight = new Button()
                {
                    X = Application.GetRealWidth(315),
                    Y = Application.GetRealWidth(14),
                    Width = Application.GetMinRealAverage(16),
                    Height = Application.GetMinRealAverage(16),
                    UnSelectedImagePath = "Public/Right.png",
                };
                smartSpeakerView.AddChidren(btnSmartSpeakerRight);
                var btnSmartSpeakerViewLine = new Button()
                {
                    X = Application.GetRealWidth(48),
                    Y = Application.GetRealWidth(43),
                    Height = Application.GetRealHeight(1),
                    Width = Application.GetRealWidth(279),
                    BackgroundColor = CSS_Color.DividingLineColor
                };
                smartSpeakerView.AddChidren(btnSmartSpeakerViewLine);
            }
            #endregion
            #region Siri
            #if __IOS__
            //if (Application.PhoneType >= 12)
            {
                supportViewCellCount++;
                //supportView 加高 显示3行 3*44
                supportView.Height = Application.GetRealWidth(supportViewCellCount * 44);
                FrameLayout siriView = new FrameLayout()
                {
                    Height = Application.GetRealWidth(44),
                };
                supportView.AddChidren(siriView);
                //住宅为当前账号才显示智能音箱入口
                Button btnSiriIcon = new Button()
                {
                    X = Application.GetRealWidth(12),
                    Y = Application.GetRealWidth(10),
                    Width = Application.GetMinRealAverage(24),
                    Height = Application.GetMinRealAverage(24),
                    UnSelectedImagePath = "PersonalCenter/SiriIcon.png",
                };
                siriView.AddChidren(btnSiriIcon);
                btnSiriText = new Button()
                {
                    X = Application.GetRealWidth(48),
                    Width = Application.GetRealWidth(270),
                    Height = Application.GetRealWidth(44),
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextAlignment = TextAlignment.CenterLeft,
                    TextSize = CSS_FontSize.TextFontSize
                };
                if(Language.CurrentLanguage == "Chinese")
                {
                    btnSiriText.Text = "Siri快捷方式";
                }else
                {
                    btnSiriText.Text = "Siri Shortcut";
                }
                siriView.AddChidren(btnSiriText);
                btnSiriText.MouseUpEventHandler = (sender, e) => {
                    var ddd =new Other.SkipControl();
                    ddd.SkipSiriView();
                };
                Button btnSiriRight = new Button()
                {
                    X = Application.GetRealWidth(315),
                    Y = Application.GetRealWidth(14),
                    Width = Application.GetMinRealAverage(16),
                    Height = Application.GetMinRealAverage(16),
                    UnSelectedImagePath = "Public/Right.png",
                };
                siriView.AddChidren(btnSiriRight);
                var btnSmartSpeakerViewLine = new Button()
                {
                    X = Application.GetRealWidth(48),
                    Y = Application.GetRealWidth(43),
                    Height = Application.GetRealHeight(1),
                    Width = Application.GetRealWidth(279),
                    BackgroundColor = CSS_Color.DividingLineColor
                };
                siriView.AddChidren(btnSmartSpeakerViewLine);
            }
            #endif
            #endregion
            #region 获取支持
            //FrameLayout supView = new FrameLayout()
            //{
            //    Height = Application.GetRealWidth(44),
            //    BackgroundColor = 0xFFFF0000,
            //};
            //supportView.AddChidren(supView);
            //supView.MouseUpEventHandler = (sender, e) =>
            //{
            //    Dialog dialog = new Dialog();
            //    var bodyView = new FrameLayout();
            //    dialog.AddChidren(bodyView);
            //    var contentView = new VerticalScrolViewLayout()
            //    {
            //        Height = Application.GetRealHeight(600),
            //        BackgroundColor = CSS_Color.MainBackgroundColor,
            //    };
            //    bodyView.AddChidren(contentView);
            //    var btnClose = new Button()
            //    {
            //        Y = Application.GetRealHeight(600),
            //        Height = Application.GetRealHeight(67),
            //        BackgroundColor = CSS_Color.WarningColor,
            //        Text = "关 闭",
            //        TextAlignment = TextAlignment.CenterLeft,
            //        TextSize = CSS_FontSize.SubheadingFontSize,
            //    };
            //    btnClose.MouseUpEventHandler = (sender9, e0) =>
            //    {
            //        dialog.Close();
            //    };
            //    bodyView.AddChidren(btnClose);
            //    foreach (var msg in Control.Ins.MsgInfoList)
            //    {
            //        var et = new TextView()
            //        {
            //            IsMoreLines = true,
            //            Height = Application.GetRealHeight(150),
            //            Width = Application.GetRealWidth(300),
            //            TextColor = CSS_Color.FirstLevelTitleColor,
            //            TextSize = CSS_FontSize.TextFontSize,
            //            Text = msg,
            //        };
            //        contentView.AddChidren(et);
            //    }
            //    dialog.Show();
            //};
            //Button btnSupportIcon = new Button()
            //{
            //    X = Application.GetRealWidth(12),
            //    Y = Application.GetRealWidth(10),
            //    Width = Application.GetMinRealAverage(24),
            //    Height = Application.GetMinRealAverage(24),
            //    UnSelectedImagePath = "PersonalCenter/SupportIcon.png",
            //};
            //supView.AddChidren(btnSupportIcon);
            //btnSupportText = new Button()
            //{
            //    X = Application.GetRealWidth(48),
            //    Width = Application.GetRealWidth(270),
            //    Height = Application.GetRealWidth(44),
            //    TextID = StringId.GetSupport,
            //    TextColor = CSS_Color.FirstLevelTitleColor,
            //    TextAlignment = TextAlignment.CenterLeft,
            //    TextSize = CSS_FontSize.TextFontSize
            //};
            //supView.AddChidren(btnSupportText);
            //Button btnSupportRight = new Button()
            //{
            //    X = Application.GetRealWidth(315),
            //    Y = Application.GetRealWidth(14),
            //    Width = Application.GetMinRealAverage(16),
            //    Height = Application.GetMinRealAverage(16),
            //    UnSelectedImagePath = "Public/Right.png",
            //};
            //supView.AddChidren(btnSupportRight);
            //var btnSupportViewLine = new Button()
            //{
            //    X = Application.GetRealWidth(48),
            //    Y = Application.GetRealWidth(43),
            //    Height = Application.GetRealHeight(1),
            //    Width = Application.GetRealWidth(279),
            //    BackgroundColor = CSS_Color.DividingLineColor
            //};
            //supView.AddChidren(btnSupportViewLine);
            #endregion
            #region 关于On Pro
            FrameLayout aboutView = new FrameLayout()