From 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 21 七月 2020 09:46:53 +0800 Subject: [PATCH] 请合并最新多功能面板代码 --- ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs | 146 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 146 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs new file mode 100755 index 0000000..06f7bcc --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs @@ -0,0 +1,146 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter.Member +{ + /// <summary> + /// 鎴愬憳鍗囩骇瀹屾垚鐨勬樉绀虹敾闈� + /// </summary> + public class SubAccountLevelUpSuccessForm : DialogCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鎴愬憳鐨勪俊鎭� + /// </summary> + private MemberInfoRes memberInfo = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="info">鎴愬憳淇℃伅</param> + public void ShowForm(MemberInfoRes info) + { + this.memberInfo = info; + + //鍒濆鍖栦腑閮ㄦ帶浠� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄦ帶浠� + /// </summary> + private void InitMiddleFrame() + { + //鑳屾櫙妗� + 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); + + //鐢ㄦ埛鍥炬爣 + string iconPath = System.IO.Path.Combine(UserCenterResourse.AccountOption.UserPictruePath, memberInfo.DistributedMark + ".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; + 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.UserName; + if (string.IsNullOrEmpty(memberInfo.UserName) == true) + { + btnName.Text = memberInfo.Account; + } + 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.Administrator; + } + else + { + 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(688); + btnFinish.Y = Application.GetRealHeight(867); + btnFinish.TextID = R.MyInternationalizationString.uFinish; + frame.AddChidren(btnFinish); + btnFinish.ButtonClickEvent += (sender, e) => + { + this.CloseForm(); + }; + } + + #endregion + } +} -- Gitblit v1.8.0