From d6fb0646531172f23648441c224cdcccd721b894 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期一, 14 十二月 2020 09:59:01 +0800
Subject: [PATCH] 请合并代码,完成晾衣架最终功能。
---
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs | 142 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 142 insertions(+), 0 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs
new file mode 100755
index 0000000..ecdad76
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs
@@ -0,0 +1,142 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.Member
+{
+ /// <summary>
+ /// 娣诲姞鎴愬憳鎴愬姛鐨勭敾闈�
+ /// </summary>
+ public class AddMemberSuccessForm : DialogCommonForm
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ /// <summary>
+ /// 鐣岄潰鍏抽棴浜嬩欢
+ /// </summary>
+ public Action FormCloseEvent = null;
+ /// <summary>
+ /// 鎴愬憳淇℃伅
+ /// </summary>
+ private MemberInfoRes memberResult = null;
+ /// <summary>
+ /// 娓呯┖浜嬩欢
+ /// </summary>
+ private bool clearEvent = true;
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+ /// </summary>
+ /// <param name="i_memberResult">鎴愬憳淇℃伅</param>
+ /// <param name="i_iconMark">澶村儚鐨凪ark</param>
+ public void ShowForm(MemberInfoRes i_memberResult, string i_iconMark)
+ {
+ this.memberResult = i_memberResult;
+
+ //鍒濆鍖栦腑閮ㄦ帶浠�
+ this.InitMiddleFrame(i_iconMark);
+ }
+
+
+ /// <summary>
+ /// 鍒濆鍖栦腑閮ㄦ帶浠�
+ /// </summary>
+ private void InitMiddleFrame(string i_iconMark)
+ {
+ //鑳屾櫙妗�
+ 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, 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;
+ 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 = memberResult.UserName;
+ if (string.IsNullOrEmpty(memberResult.UserName) == true)
+ {
+ btnName.Text = memberResult.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;
+ 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;
+ btnSuccess.TextSize = 20;
+ frame.AddChidren(btnSuccess);
+
+ //瀹屾垚
+ var btnFinish = new BottomClickButton(688);
+ btnFinish.Y = Application.GetRealHeight(867);
+ btnFinish.TextID = R.MyInternationalizationString.uFinish;
+ frame.AddChidren(btnFinish);
+ btnFinish.ButtonClickEvent += (sender, e) =>
+ {
+ this.clearEvent = false;
+
+ this.CloseForm();
+ FormCloseEvent?.Invoke();
+ FormCloseEvent = null;
+ };
+ }
+
+ #endregion
+
+ #region 鈻� 鐣岄潰鍏抽棴___________________________
+
+ /// <summary>
+ /// 鐣岄潰鍏抽棴
+ /// </summary>
+ public override void CloseFormBefore()
+ {
+ if (clearEvent == true)
+ {
+ FormCloseEvent = null;
+ }
+ base.CloseFormBefore();
+ }
+
+ #endregion
+ }
+}
--
Gitblit v1.8.0