From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs | 167 +++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 106 insertions(+), 61 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs index 20a7be8..3d0f656 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs @@ -7,91 +7,136 @@ /// <summary> /// 鎴愬憳鍗囩骇瀹屾垚鐨勬樉绀虹敾闈� /// </summary> - public class SubAccountLevelUpSuccessForm : UserCenterCommonForm + public class SubAccountLevelUpSuccessForm : DialogCommonForm { + #region 鈻� 鍙橀噺澹版槑___________________________ + /// <summary> /// 鎴愬憳鐨勪俊鎭� - /// </summary> + /// </summary> private MemberInfoRes memberInfo = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ /// <summary> /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) /// </summary> - /// <param name="info">鎴愬憳淇℃伅</param> - public void ShowForm(MemberInfoRes info) - { - this.memberInfo = info; - - //璁剧疆鏍囬淇℃伅 - base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uMemberAuthorization)); - - //鍒濆鍖栦腑閮ㄦ帶浠� - this.InitMiddleFrame(); + /// <param name="info">鎴愬憳淇℃伅</param> + public void ShowForm(MemberInfoRes info) + { + this.memberInfo = info; + + //鍒濆鍖栦腑閮ㄦ帶浠� + this.InitMiddleFrame(); } - /// <summary> - /// 鍒濆鍖栦腑閮ㄦ帶浠� - /// </summary> - private void InitMiddleFrame() + /// <summary> + /// 鍒濆鍖栦腑閮ㄦ帶浠� + /// </summary> + private void InitMiddleFrame() { - //鎴愬憳鎺堟潈鎴愬姛锛� - var btnMsg = new MsgViewControl(800, true); - btnMsg.TextID = R.MyInternationalizationString.uMemberAuthorizationSuccess; - btnMsg.Y = Application.GetRealHeight(100); - btnMsg.TextAlignment = TextAlignment.Center; - btnMsg.Gravity = Gravity.CenterHorizontal; - bodyFrameLayout.AddChidren(btnMsg); + //鑳屾櫙妗� + var frame = new FrameLayout(); + frame.Width = Application.GetRealWidth(838); + frame.Height = Application.GetRealHeight(1097); + frame.BackgroundColor = UserCenterColor.Current.White; + frame.Gravity = Gravity.Center; + frame.Radius = (uint)Application.GetRealHeight(17); + bodyFrameLayout.AddChidren(frame); - //鐢ㄦ埛鍥炬爣 - var btnUserIcon = new ProfilePhotoControl(); - btnUserIcon.Y = Application.GetRealHeight(280); + //鐢ㄦ埛鍥炬爣 + string iconPath = System.IO.Path.Combine(HdlFileNameResourse.UserPictrueDirectory, memberInfo.ChildAccountId + ".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 = "Account/Admin.png"; - bodyFrameLayout.AddChidren(btnUserIcon); - - //鏉冮檺 - var btnAuthority = new ViewNormalControl(800, true); - btnAuthority.TextAlignment = TextAlignment.Center; - btnAuthority.Y = btnUserIcon.Bottom + Application.GetRealHeight(10); - btnAuthority.Gravity = Gravity.CenterHorizontal; - btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor; - btnAuthority.TextID = R.MyInternationalizationString.uMember; + 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.IsBold = true; + btnName.TextAlignment = TextAlignment.Center; + btnName.Y = Application.GetRealHeight(334); + btnName.TextColor = UserCenterColor.Current.TextColor2; + btnName.TextSize = 16; + btnName.Text = memberInfo.ShowName; + frame.AddChidren(btnName); + + //鏉冮檺 + var btnAuthority = new NormalViewControl(frame.Width, Application.GetRealHeight(50), false); + btnAuthority.TextAlignment = TextAlignment.Center; + btnAuthority.Y = Application.GetRealHeight(400); + btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor1; if (memberInfo.AccountType == 1) { - //鎷ユ湁绠$悊鍛樻潈闄� - btnAuthority.TextID = R.MyInternationalizationString.uMemberHadActionAuthority; + btnAuthority.TextID = R.MyInternationalizationString.Administrator; } - bodyFrameLayout.AddChidren(btnAuthority); - - //鏄电О - var btnName = new ViewNormalControl(800, true); - btnName.TextAlignment = TextAlignment.Center; - btnName.Y = btnAuthority.Bottom + Application.GetRealHeight(10); - btnName.Text = memberInfo.UserName; - btnName.Gravity = Gravity.CenterHorizontal; - bodyFrameLayout.AddChidren(btnName); - if (string.IsNullOrEmpty(memberInfo.UserName) == true) + else { - btnName.Text = memberInfo.Account; + btnAuthority.TextID = R.MyInternationalizationString.uMember; } + btnAuthority.TextSize = 12; + frame.AddChidren(btnAuthority); + + + var btnMsg = new NormalViewControl(frame.Width, Application.GetRealHeight(81), false); + btnMsg.IsBold = true; + if (memberInfo.AccountType == 1) + { + //鎺堟潈鎴愬姛! + btnMsg.TextID = R.MyInternationalizationString.uMemberAuthorizationSuccess; + } + else + { + //鍙栨秷鎴愬姛 + btnMsg.TextID = R.MyInternationalizationString.uCancelSuccess; + } + btnMsg.Y = Application.GetRealHeight(541); + btnMsg.TextAlignment = TextAlignment.Center; + btnMsg.TextSize = 20; + frame.AddChidren(btnMsg); + + var btnView = new NormalViewControl(frame.Width, Application.GetRealHeight(50), false); + btnView.Y = btnMsg.Bottom; + btnView.TextAlignment = TextAlignment.Center; + if (memberInfo.AccountType == 1) + { + //璇ユ垚鍛樺凡鎴愪负绠$悊鍛� + btnView.TextID = R.MyInternationalizationString.uSubAccountLevelIsUp; + } + else + { + //璇ョ鐞嗗憳宸叉垚涓烘垚鍛� + btnView.TextID = R.MyInternationalizationString.uSubAccountLevelIsDown; + } + btnView.TextColor = UserCenterColor.Current.TextGrayColor1; + btnView.IsMoreLines = true; + btnView.TextSize = 12; + frame.AddChidren(btnView); //瀹屾垚 - var btnFinish = new BottomClickButton(); + var btnFinish = new BottomClickButton(688); + btnFinish.Y = Application.GetRealHeight(867); btnFinish.TextID = R.MyInternationalizationString.uFinish; - bodyFrameLayout.AddChidren(btnFinish); - btnFinish.MouseUpEventHandler += (sender, e) => + frame.AddChidren(btnFinish); + btnFinish.ButtonClickEvent += (sender, e) => { this.CloseForm(); }; - - //璇ユ垚鍛樺凡鎴愪负绠$悊锛屾偍鐨勬帶鍒舵潈闄愬凡绉讳氦 - var btnView = new ViewNormalControl(800, true); - btnView.Y = btnFinish.Y - Application.GetRealHeight(100); - btnView.TextAlignment = TextAlignment.Center; - btnView.TextID = R.MyInternationalizationString.uSubAccountLevelIsUpAndLetAuthorization; - btnView.TextColor = UserCenterColor.Current.TextGrayColor; - btnView.Gravity = Gravity.CenterHorizontal; - bodyFrameLayout.AddChidren(btnView); } + + #endregion } } -- Gitblit v1.8.0