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/Transfer/TransferResidenceResultForm.cs |  143 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 143 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Transfer/TransferResidenceResultForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Transfer/TransferResidenceResultForm.cs
new file mode 100755
index 0000000..c0efc0b
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Transfer/TransferResidenceResultForm.cs
@@ -0,0 +1,143 @@
+锘縰sing Shared.Phone.UserCenter;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.Transfer
+{
+    /// <summary>
+    /// 杩囨埛鐨勭粨鏋滅晫闈�
+    /// </summary>
+    public class TransferResidenceResultForm : DialogCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 鐣岄潰鍏抽棴浜嬩欢
+        /// </summary>
+        public Action FinishEvent = null;
+        /// <summary>
+        /// 娓呯┖浜嬩欢
+        /// </summary>
+        private bool clearEvent = true;
+        /// <summary>
+        /// 杩囨埛淇℃伅
+        /// </summary>
+        private AccountInfoResult memberResult = null;
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        /// <param name="i_memberResult">杩囨埛淇℃伅</param>
+        /// <param name="i_result">true:鎴愬姛 false:澶辫触</param>
+        public void ShowForm(AccountInfoResult i_memberResult, bool i_result)
+        {
+            this.memberResult = i_memberResult;
+            this.CloseFormByClickBack = false;
+
+            //鍒濆鍖栦腑閮ㄦ帶浠�
+            this.InitMiddleFrame(i_result);
+        }
+
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄦ帶浠�
+        /// </summary>
+        private void InitMiddleFrame(bool success)
+        {
+            //鑳屾櫙妗�
+            var frameBack = new FrameLayout();
+            frameBack.Width = Application.GetRealWidth(838);
+            frameBack.Height = Application.GetRealHeight(1097);
+            frameBack.Y = Application.GetRealHeight(392);
+            frameBack.BackgroundColor = UserCenterColor.Current.White;
+            frameBack.Gravity = Gravity.CenterHorizontal;
+            frameBack.Radius = (uint)Application.GetRealHeight(17);
+            bodyFrameLayout.AddChidren(frameBack);
+
+            //鍏抽棴鎸夐挳(澶辫触涓撶敤)
+            if (success == false)
+            {
+                var btnCloseIcon = new IconViewControl(86);
+                btnCloseIcon.Y = Application.GetRealHeight(23);
+                btnCloseIcon.X = frameBack.Width - btnCloseIcon.IconSize - Application.GetRealWidth(58);
+                btnCloseIcon.UnSelectedImagePath = "Item/CancelIcon.png";
+                frameBack.AddChidren(btnCloseIcon);
+                btnCloseIcon.ButtonClickEvent += (sender, e) =>
+                {
+                    this.CloseForm();
+                };
+            }
+
+            //鍥炬爣
+            var btnIcon = new IconViewControl(420);
+            btnIcon.Y = Application.GetRealHeight(92);
+            btnIcon.Gravity = Gravity.CenterHorizontal;
+            btnIcon.UnSelectedImagePath = success == true ? "Item/AdjustSuccessIcon.png" : "Item/AdjustFailIcon.png";
+            frameBack.AddChidren(btnIcon);
+
+            //杩囨埛鎴愬姛 / 杩囨埛澶辫触
+            var btnMsg = new NormalViewControl(frameBack.Width, Application.GetRealHeight(85), false);
+            btnMsg.Y = btnIcon.Bottom + Application.GetRealHeight(29);
+            btnMsg.TextAlignment = TextAlignment.Center;
+            btnMsg.IsBold = true;
+            btnMsg.TextSize = 20;
+            btnMsg.TextID = success == true ? R.MyInternationalizationString.uTransferSuccess : R.MyInternationalizationString.uTransferFail;
+            frameBack.AddChidren(btnMsg);
+
+            if (success == true)
+            {
+                string strMsg = Language.StringByID(R.MyInternationalizationString.uCongratulationsXXBecomingNNAdministrator);
+                string userName = string.IsNullOrEmpty(memberResult.UserName) == false ? memberResult.UserName : memberResult.Account;
+                strMsg = strMsg.Replace("{0}", userName).Replace("{1}", Common.Config.Instance.Home.Name);
+
+                //鎭枩XXXXX鎴愪负銆孨NNNN銆嶇鐞嗗憳
+                var btnMsg2 = new NormalViewControl(frameBack.Width - Application.GetRealWidth(100), Application.GetRealHeight(105), false);
+                btnMsg2.Y = btnMsg.Bottom + Application.GetRealHeight(12);
+                btnMsg2.Gravity = Gravity.CenterHorizontal;
+                btnMsg2.TextSize = 12;
+                btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1;
+                btnMsg2.TextAlignment = TextAlignment.Center;
+                btnMsg2.IsMoreLines = true;
+                btnMsg2.Text = strMsg;
+                frameBack.AddChidren(btnMsg2);
+            }
+
+            //瀹屾垚
+            var btnFinish = new BottomClickButton(688);
+            btnFinish.Y = Application.GetRealHeight(867);
+            btnFinish.TextID = success == true ? R.MyInternationalizationString.uFinish : R.MyInternationalizationString.uReDoAgain;
+            frameBack.AddChidren(btnFinish);
+            btnFinish.ButtonClickEvent += (sender, e) =>
+            {
+                this.clearEvent = false;
+
+                this.CloseForm();
+                FinishEvent?.Invoke();
+                FinishEvent = null;
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 鐣岄潰鍏抽棴___________________________
+
+        /// <summary>
+        /// 鐣岄潰鍏抽棴
+        /// </summary>
+        public override void CloseFormBefore()
+        {
+            if (clearEvent == true)
+            {
+                FinishEvent = null;
+            }
+            base.CloseFormBefore();
+        }
+
+        #endregion
+    }
+}

--
Gitblit v1.8.0