HDL Home App 第二版本 旧平台金堂用 正在使用
hxb
2022-08-30 25429f085093d89d543a0b90e30d0d62d1b7dac9
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs
@@ -13,7 +13,7 @@
        /// <summary>
        /// 界面关闭事件
        /// </summary>
        /// </summary>
        public Action FormCloseEvent = null;
        /// <summary>
        /// 成员信息
@@ -30,21 +30,22 @@
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        /// <param name="i_memberResult">成员信息</param>
        public void ShowForm(MemberInfoRes i_memberResult)
        {
            this.memberResult = i_memberResult;
            //初始化中部控件
            this.InitMiddleFrame();
        }
        /// </summary>
        /// <param name="i_memberResult">成员信息</param>
        /// <param name="i_iconMark">头像的Mark</param>
        public void ShowForm(MemberInfoRes i_memberResult, string i_iconMark)
        {
            this.memberResult = i_memberResult;
            //初始化中部控件
            this.InitMiddleFrame(i_iconMark);
        }
        /// <summary>
        /// 初始化中部控件
        /// </summary>
        private void InitMiddleFrame()
        /// </summary>
        private void InitMiddleFrame(string i_iconMark)
        {
            //背景框
            var frame = new FrameLayout();
@@ -52,23 +53,35 @@
            frame.Height = Application.GetRealHeight(1097);
            frame.BackgroundColor = UserCenterColor.Current.White;
            frame.Gravity = Gravity.Center;
            frame.Radius = (uint)Application.GetMinRealAverage(6);
            frame.Radius = (uint)Application.GetRealHeight(17);
            bodyFrameLayout.AddChidren(frame);
            //用户图标
            var btnUserIcon = new PicViewControl(207, 207);
            btnUserIcon.Y = Application.GetRealHeight(104);
            string iconPath = System.IO.Path.Combine(UserCenterResourse.AccountOption.UserPictruePath, i_iconMark + ".png");
            var btnUserIcon = new ImageView();
            btnUserIcon.Height = this.GetPictrueRealSize(207);
            btnUserIcon.Width = this.GetPictrueRealSize(207);
            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(207) / 2;
            btnUserIcon.Y = Application.GetRealHeight(104);
            btnUserIcon.Gravity = Gravity.CenterHorizontal;
            btnUserIcon.UnSelectedImagePath = "Center/Admin.png";
            if (System.IO.File.Exists(iconPath) == true)
            {
                btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
            }
            else
            {
                btnUserIcon.ImagePath = "Center/Admin.png";
            }
            frame.AddChidren(btnUserIcon);
            //昵称
            var btnName = new NormalViewControl(frame.Width, Application.GetRealHeight(55), false);
            btnName.TextAlignment = TextAlignment.Center;
            btnName.Y = Application.GetRealHeight(334);
            btnName.TextColor = UserCenterColor.Current.TextColor2;
            btnName.TextSize = 16;
            btnName.Text = memberResult.UserName;
            btnName.IsBold = true;
            btnName.TextAlignment = TextAlignment.Center;
            btnName.Y = Application.GetRealHeight(334);
            btnName.TextColor = UserCenterColor.Current.TextColor2;
            btnName.TextSize = 16;
            btnName.Text = memberResult.UserName;
            if (string.IsNullOrEmpty(memberResult.UserName) == true)
            {
                btnName.Text = memberResult.Account;
@@ -77,15 +90,16 @@
            //权限
            var btnAuthority = new NormalViewControl(frame.Width, Application.GetRealHeight(50), false);
            btnAuthority.TextAlignment = TextAlignment.Center;
            btnAuthority.Y = Application.GetRealHeight(400);
            btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor;
            btnAuthority.TextAlignment = TextAlignment.Center;
            btnAuthority.Y = Application.GetRealHeight(400);
            btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor1;
            btnAuthority.TextID = R.MyInternationalizationString.uMember;
            btnAuthority.TextSize = 12;
            frame.AddChidren(btnAuthority);
            //家族成员添加成功
            var btnSuccess = new NormalViewControl(frame.Width, Application.GetRealHeight(82), false);
            btnSuccess.IsBold = true;
            btnSuccess.Y = Application.GetRealHeight(547);
            btnSuccess.TextAlignment = TextAlignment.Center;
            btnSuccess.TextID = R.MyInternationalizationString.uAddMemberSuccess;
@@ -114,13 +128,13 @@
        /// <summary>
        /// 界面关闭
        /// </summary>
        public override void CloseForm()
        public override void CloseFormBefore()
        {
            if (clearEvent == true)
            {
                FormCloseEvent = null;
            }
            base.CloseForm();
            base.CloseFormBefore();
        }
        #endregion