wei
2021-08-27 eda3fb873e59544ff36301b51e05aef64f87b0f9
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -84,19 +84,18 @@
        /// 区域成员小区域文本
        /// </summary>
        Button btnResidenceMemberText;
        #region F3阶段
        ///// <summary>
        ///// 区域安放小区域
        ///// </summary>
        //FrameLayout residenceArmView;
        ///// <summary>
        ///// 区域成安放小区域图标
        ///// </summary>
        //Button btnResidenceArmIcon;
        ///// <summary>
        ///// 区域安放小区域文本
        ///// </summary>
        //Button btnResidenceArmText;
        /// <summary>
        /// 区域安放小区域
        /// </summary>
        FrameLayout residenceArmView;
        /// <summary>
        /// 区域成安放小区域图标
        /// </summary>
        Button btnResidenceArmIcon;
        /// <summary>
        /// 区域安放小区域文本
        /// </summary>
        Button btnResidenceArmText;
        ///// <summary>
        ///// 区域辅助功能小区域
        ///// </summary>
@@ -121,9 +120,7 @@
        /// 区域添加功能小区域文本
        /// </summary>
        Button btnResidenceAddFunctionText;
        #endregion
        #region F3阶段
        ///// <summary>
        ///// 软件设置区域
        ///// </summary>
@@ -155,7 +152,6 @@
        /// </summary>
        Button btnSmartSpeakerText;
        #endregion
        public PersonalCenterPage()
        {
@@ -234,6 +230,42 @@
            #endregion
            //体验模式
            if(MainPage.NoLoginMode)
            {
                Button btnExit = new Button()
                {
                    Y = Application.GetRealHeight(288) + personalInfoView.Bottom,
                    Gravity = Gravity.CenterHorizontal,
                    Height = Application.GetRealHeight(60),
                    Width = Application.GetRealWidth(330),
                    TextAlignment = TextAlignment.Center,
                    SelectedTextColor = CSS_Color.MainColor,
                    TextColor = CSS_Color.WarningColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextID = StringId.NextStep,
                    Radius = 10,
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                    SelectedBackgroundColor = CSS_Color.MainBackgroundColor,
                };
                if(Language.CurrentLanguage =="Chinese")
                {
                    btnExit.Text = "退出体验模式";
                }
                else
                {
                    btnExit.Text = "Exit dome";
                }
                btnExit.MouseUpEventHandler = (sender, e) =>
                {
                    MainPage.NoLoginMode = false;
                    UserInfo.Current.ClearUserInfo();
                    HDLCommon.Current.Logout();
                };
                bodyView.AddChidren(btnExit);
                return;
            }
            contentView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(8) + personalInfoView.Bottom,
@@ -250,21 +282,21 @@
            contentView.RemoveAll();
            #region 住宅信息区域
            //if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
            //{
            //    residenceInfoView = new FrameLayout()
            //    {
            //        Gravity = Gravity.CenterHorizontal,
            //        Width = Application.GetRealWidth(343),
            //        Height = Application.GetRealHeight(213),
            //        BackgroundColor = CSS_Color.MainBackgroundColor,
            //        Radius = (uint)Application.GetRealHeight(12),
            //        BorderColor = 0x00FFFFFF,
            //        BorderWidth = 0,
            //    };
            //    contentView.AddChidren(residenceInfoView);
            //}
            //else
            if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare && DB_ResidenceData.Instance.GatewayType == 1)
            {
                residenceInfoView = new FrameLayout()
                {
                    Gravity = Gravity.CenterHorizontal,
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(213),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                    Radius = (uint)Application.GetRealHeight(12),
                    BorderColor = 0x00FFFFFF,
                    BorderWidth = 0,
                };
                contentView.AddChidren(residenceInfoView);
            }
            else
            {
                residenceInfoView = new FrameLayout()
                {
@@ -409,36 +441,40 @@
                };
                residenceMemberView.AddChidren(btnResidenceMemberText);
                #endregion
                #region ---安放区域
                #region F3阶段
                //residenceArmView = new FrameLayout()
                //{
                //    X = residenceMemberView.Right,
                //    Y = Application.GetRealHeight(68),
                //    Width = Application.GetRealWidth(64 + 48),
                //    Height = Application.GetRealHeight(64),
                //};
                //residenceInfoView.AddChidren(residenceArmView);
                //btnResidenceArmIcon = new Button
                //{
                //    Gravity = Gravity.CenterHorizontal,
                //    Y = Application.GetRealHeight(5),
                //    Width = Application.GetMinRealAverage(30),
                //    Height = Application.GetMinRealAverage(30),
                //    UnSelectedImagePath = "PersonalCenter/ResidenceArmIcon.png",
                //};
                //residenceArmView.AddChidren(btnResidenceArmIcon);
                //btnResidenceArmText = new Button()
                //{
                //    Y = btnResidenceManageIcon.Bottom,
                //    Height = Application.GetRealHeight(29),
                //    TextID = StringId.Undefense,
                //    TextAlignment = TextAlignment.Center,
                //    TextColor = CSS_Color.FirstLevelTitleColor,
                //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                //};
                //residenceArmView.AddChidren(btnResidenceArmText);
                #endregion
                if (DB_ResidenceData.Instance.GatewayType == 1)
                {
                    #region ---安放区域
                    residenceArmView = new FrameLayout()
                    {
                        X = residenceMemberView.Right,
                        Y = Application.GetRealHeight(68),
                        Width = Application.GetRealWidth(64 + 48),
                        Height = Application.GetRealHeight(64),
                    };
                    residenceInfoView.AddChidren(residenceArmView);
                    btnResidenceArmIcon = new Button
                    {
                        Gravity = Gravity.CenterHorizontal,
                        Y = Application.GetRealHeight(5),
                        Width = Application.GetMinRealAverage(30),
                        Height = Application.GetMinRealAverage(30),
                        UnSelectedImagePath = "PersonalCenter/ResidenceArmIcon.png",
                        SelectedImagePath = "PersonalCenter/ResidenceDefenseIcon.png",
                    };
                    residenceArmView.AddChidren(btnResidenceArmIcon);
                    btnResidenceArmText = new Button()
                    {
                        Y = btnResidenceManageIcon.Bottom,
                        Height = Application.GetRealHeight(29),
                        TextID = StringId.Undefense,
                        TextAlignment = TextAlignment.Center,
                        TextColor = CSS_Color.FirstLevelTitleColor,
                        TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                    };
                    residenceArmView.AddChidren(btnResidenceArmText);
                    #endregion
                }
                #region ---数据备份区域
                //residenceDataBackupView = new FrameLayout()
                //{
@@ -500,37 +536,39 @@
                //residenceAuxiliaryFunctionView.AddChidren(btnResidenceAuxiliaryFunctionText);
                #endregion
                #region ---添加功能区域
                residenceAddFunctionView = new FrameLayout()
                if (DB_ResidenceData.Instance.GatewayType == 1)
                {
                    X = residenceMemberView.Right,
                    //X = Application.GetRealWidth(28 - 24),
                    Y = Application.GetRealHeight(68),
                    Width = Application.GetRealWidth(64 + 48),
                    Height = Application.GetRealWidth(64),
                };
                residenceInfoView.AddChidren(residenceAddFunctionView);
                btnResidenceAddFunctionIcon = new Button
                {
                    Gravity = Gravity.CenterHorizontal,
                    Y = Application.GetRealHeight(5),
                    Width = Application.GetMinRealAverage(30),
                    Height = Application.GetMinRealAverage(30),
                    UnSelectedImagePath = "PersonalCenter/AddFunctionIcon.png",
                };
                residenceAddFunctionView.AddChidren(btnResidenceAddFunctionIcon);
                btnResidenceAddFunctionText = new Button()
                {
                    Y = btnResidenceManageIcon.Bottom,
                    Height = Application.GetRealHeight(29),
                    TextID = StringId.AddFunction,
                    TextAlignment = TextAlignment.Center,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                };
                residenceAddFunctionView.AddChidren(btnResidenceAddFunctionText);
                #endregion
                #endregion
                    #region ---添加功能区域
                    residenceAddFunctionView = new FrameLayout()
                    {
                        //X = residenceMemberView.Right,
                        X = Application.GetRealWidth(28 - 24),
                        Y = residenceManageView.Bottom,
                        Width = Application.GetRealWidth(64 + 48),
                        Height = Application.GetRealWidth(64),
                    };
                    residenceInfoView.AddChidren(residenceAddFunctionView);
                    btnResidenceAddFunctionIcon = new Button
                    {
                        Gravity = Gravity.CenterHorizontal,
                        Y = Application.GetRealHeight(5),
                        Width = Application.GetMinRealAverage(30),
                        Height = Application.GetMinRealAverage(30),
                        UnSelectedImagePath = "PersonalCenter/AddFunctionIcon.png",
                    };
                    residenceAddFunctionView.AddChidren(btnResidenceAddFunctionIcon);
                    btnResidenceAddFunctionText = new Button()
                    {
                        Y = btnResidenceManageIcon.Bottom,
                        Height = Application.GetRealHeight(29),
                        TextID = StringId.AddFunction,
                        TextAlignment = TextAlignment.Center,
                        TextColor = CSS_Color.FirstLevelTitleColor,
                        TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                    };
                    residenceAddFunctionView.AddChidren(btnResidenceAddFunctionText);
                    #endregion
                }
            }
            else
            {
@@ -544,36 +582,40 @@
                    TextID = StringId.FunctionNotOpen,
                });
                if (DB_ResidenceData.Instance.GatewayType == 1)
                {
                    #region ---安放区域
                    residenceArmView = new FrameLayout()
                    {
                        X = Application.GetRealWidth(28 - 24),
                        Y = Application.GetRealHeight(68),
                        Width = Application.GetRealWidth(64 + 48),
                        Height = Application.GetRealWidth(64),
                    };
                    residenceInfoView.AddChidren(residenceArmView);
                    btnResidenceArmIcon = new Button
                    {
                        Gravity = Gravity.CenterHorizontal,
                        Y = Application.GetRealHeight(5),
                        Width = Application.GetMinRealAverage(30),
                        Height = Application.GetMinRealAverage(30),
                        UnSelectedImagePath = "PersonalCenter/ResidenceArmIcon.png",
                        SelectedImagePath = "PersonalCenter/ResidenceDefenseIcon.png",
                    };
                    residenceArmView.AddChidren(btnResidenceArmIcon);
                    btnResidenceArmText = new Button()
                    {
                        Y = btnResidenceArmIcon.Bottom,
                        Height = Application.GetRealHeight(29),
                        TextID = StringId.Undefense,
                        TextAlignment = TextAlignment.Center,
                        TextColor = CSS_Color.FirstLevelTitleColor,
                        TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                    };
                    residenceArmView.AddChidren(btnResidenceArmText);
                    #endregion
                }
                #region F3阶段
                #region ---安放区域
                //residenceArmView = new FrameLayout()
                //{
                //    X = Application.GetRealWidth(28 - 24),
                //    Y = Application.GetRealHeight(68),
                //    Width = Application.GetRealWidth(64 + 48),
                //    Height = Application.GetRealWidth(64),
                //};
                //residenceInfoView.AddChidren(residenceArmView);
                //btnResidenceArmIcon = new Button
                //{
                //    Gravity = Gravity.CenterHorizontal,
                //    Y = Application.GetRealHeight(5),
                //    Width = Application.GetMinRealAverage(30),
                //    Height = Application.GetMinRealAverage(30),
                //    UnSelectedImagePath = "PersonalCenter/ResidenceArmIcon.png",
                //};
                //residenceArmView.AddChidren(btnResidenceArmIcon);
                //btnResidenceArmText = new Button()
                //{
                //    Y = btnResidenceArmIcon.Bottom,
                //    Height = Application.GetRealHeight(29),
                //    TextID = StringId.Undefense,
                //    TextAlignment = TextAlignment.Center,
                //    TextColor = CSS_Color.FirstLevelTitleColor,
                //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                //};
                //residenceArmView.AddChidren(btnResidenceArmText);
                #endregion
                #region ---数据备份区域
                //residenceDataBackupView = new FrameLayout()
                //{