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/UserMain/QRCodeForm.cs |   99 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 99 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs
new file mode 100755
index 0000000..5cfabb9
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs
@@ -0,0 +1,99 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.UserMain
+{
+    /// <summary>
+    /// 涓汉浜岀淮鐮佺晫闈�
+    /// </summary>
+    public class QRCodeForm : DialogCommonForm
+    {
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        public void ShowForm()
+        {
+            //鍒濆鍖栦腑閮ㄦ帶浠�
+            this.InitMiddleFrame();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄦ帶浠�
+        /// </summary>
+        private void InitMiddleFrame()
+        {
+            uint roundHeigth = (uint)this.GetRealSizeEx(17);
+
+            //鑳屾櫙妗�
+            var frameBack = new FrameLayout();
+            frameBack.Width = this.GetRealSizeEx(688);
+            frameBack.Height = this.GetRealSizeEx(968);
+            frameBack.Y = this.GetRealHeight(498);
+            frameBack.Gravity = Gravity.CenterHorizontal;
+            frameBack.Radius = roundHeigth;
+            bodyFrameLayout.AddChidren(frameBack);
+
+            //椤堕儴鍦嗚
+            var frameTop = new FrameLayout();
+            frameTop.Height = this.GetRealSizeEx(100);
+            frameTop.BackgroundColor = 0xff232323;
+            frameTop.Radius = roundHeigth;
+            frameBack.AddChidren(frameTop);
+            //搴曢儴鍦嗚
+            var frameBottom = new FrameLayout();
+            frameBottom.Y = frameBack.Height - this.GetRealSizeEx(100);
+            frameBottom.Height = this.GetRealSizeEx(100);
+            frameBottom.BackgroundColor = UserCenterColor.Current.White;
+            frameBottom.Radius = roundHeigth;
+            frameBack.AddChidren(frameBottom);
+            //澶撮儴鏂瑰舰
+            var frameTitle = new FrameLayout();
+            frameTitle.Height = this.GetRealSizeEx(274) - frameTop.Height / 2;
+            frameTitle.Y = frameTop.Height / 2;
+            frameTitle.BackgroundColor = 0xff232323;
+            frameBack.AddChidren(frameTitle);
+            //鏄庣粏鏂瑰舰
+            var frameDetail = new FrameLayout();
+            frameDetail.Height = this.GetRealSizeEx(694) - frameBottom.Height / 2;
+            frameDetail.Y = frameTitle.Bottom;
+            frameDetail.BackgroundColor = UserCenterColor.Current.White;
+            frameBack.AddChidren(frameDetail);
+
+            //鐢ㄦ埛澶村儚
+            var btnIcon = new ImageView();
+            btnIcon.Height = this.GetRealSizeEx(294);
+            btnIcon.Width = this.GetRealSizeEx(294);
+            btnIcon.Radius = (uint)this.GetRealSizeEx(294) / 2;
+            btnIcon.Y = frameDetail.Y - this.GetRealSizeEx(294) / 2;
+            btnIcon.Gravity = Gravity.CenterHorizontal;
+            btnIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
+            frameBack.AddChidren(btnIcon);
+            //鐢ㄦ埛鍚�
+            var btnUser = new NormalViewControl(frameBack.Width, this.GetRealHeight(50), false);
+            btnUser.IsBold = true;
+            btnUser.Y = btnIcon.Bottom + this.GetRealSizeEx(23);
+            btnUser.Text = UserCenterResourse.UserInfo.UserName;
+            btnUser.TextAlignment = TextAlignment.Center;
+            btnUser.TextColor = UserCenterColor.Current.TextGrayColor2;
+            frameBack.AddChidren(btnUser);
+            //浜岀淮鐮�
+            var btnQrCode = new PicViewControl(this.GetRealSizeEx(236), this.GetRealSizeEx(236), false);
+            btnQrCode.ImageBytes = QRCode.BytesFromText(UserCenterResourse.UserInfo.Account, this.GetPictrueRealSize(236), this.GetPictrueRealSize(236));
+            btnQrCode.Gravity = Gravity.CenterHorizontal;
+            btnQrCode.Y = btnUser.Bottom + this.GetRealSizeEx(69);
+            frameBack.AddChidren(btnQrCode);
+            //鎵竴鎵坊鍔犳垚鍛�
+            var btnMsg = new NormalViewControl(frameBack.Width, this.GetRealHeight(60), false);
+            btnMsg.Y = btnQrCode.Bottom + this.GetRealSizeEx(35);
+            btnMsg.TextAlignment = TextAlignment.Center;
+            btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnMsg.TextID = R.MyInternationalizationString.uScanAndAddMember;
+            frameBack.AddChidren(btnMsg);
+        }
+
+        #endregion
+    }
+}

--
Gitblit v1.8.0