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/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..ce92e3e --- /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)Application.GetRealHeight(17); + + //鑳屾櫙妗� + var frameBack = new FrameLayout(); + frameBack.Width = Application.GetRealWidth(688); + frameBack.Height = Application.GetRealHeight(968); + frameBack.Y = Application.GetRealHeight(498); + frameBack.Gravity = Gravity.CenterHorizontal; + frameBack.Radius = roundHeigth; + bodyFrameLayout.AddChidren(frameBack); + + //椤堕儴鍦嗚 + var frameTop = new FrameLayout(); + frameTop.Height = Application.GetRealHeight(100); + frameTop.BackgroundColor = 0xff232323; + frameTop.Radius = roundHeigth; + frameBack.AddChidren(frameTop); + //搴曢儴鍦嗚 + var frameBottom = new FrameLayout(); + frameBottom.Y = frameBack.Height - Application.GetRealHeight(100); + frameBottom.Height = Application.GetRealHeight(100); + frameBottom.BackgroundColor = UserCenterColor.Current.White; + frameBottom.Radius = roundHeigth; + frameBack.AddChidren(frameBottom); + //澶撮儴鏂瑰舰 + var frameTitle = new FrameLayout(); + frameTitle.Height = Application.GetRealHeight(274) - frameTop.Height / 2; + frameTitle.Y = frameTop.Height / 2; + frameTitle.BackgroundColor = 0xff232323; + frameBack.AddChidren(frameTitle); + //鏄庣粏鏂瑰舰 + var frameDetail = new FrameLayout(); + frameDetail.Height = Application.GetRealHeight(694) - frameBottom.Height / 2; + frameDetail.Y = frameTitle.Bottom; + frameDetail.BackgroundColor = UserCenterColor.Current.White; + frameBack.AddChidren(frameDetail); + + //鐢ㄦ埛澶村儚 + var btnIcon = new ImageView(); + btnIcon.Height = this.GetPictrueRealSize(294); + btnIcon.Width = this.GetPictrueRealSize(294); + btnIcon.Radius = (uint)this.GetPictrueRealSize(294) / 2; + btnIcon.Y = Application.GetRealHeight(121); + btnIcon.Gravity = Gravity.CenterHorizontal; + btnIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile); + frameBack.AddChidren(btnIcon); + //鐢ㄦ埛鍚� + var btnUser = new NormalViewControl(frameBack.Width, Application.GetRealHeight(46), false); + btnUser.IsBold = true; + btnUser.Y = Application.GetRealHeight(147); + btnUser.Text = UserCenterResourse.UserInfo.UserName; + btnUser.TextAlignment = TextAlignment.Center; + btnUser.TextColor = UserCenterColor.Current.TextGrayColor2; + frameDetail.AddChidren(btnUser); + //浜岀淮鐮� + var btnQrCode = new PicViewControl(236, 236); + btnQrCode.ImageBytes = QRCode.BytesFromText(UserCenterResourse.UserInfo.Account, this.GetPictrueRealSize(236), this.GetPictrueRealSize(236)); + btnQrCode.Gravity = Gravity.CenterHorizontal; + btnQrCode.Y = Application.GetRealHeight(262); + frameDetail.AddChidren(btnQrCode); + //鎵竴鎵坊鍔犳垚鍛� + var btnMsg = new NormalViewControl(frameBack.Width, Application.GetRealHeight(58), false); + btnMsg.Y = Application.GetRealHeight(533); + btnMsg.TextAlignment = TextAlignment.Center; + btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3; + btnMsg.TextID = R.MyInternationalizationString.uScanAndAddMember; + frameDetail.AddChidren(btnMsg); + } + + #endregion + } +} -- Gitblit v1.8.0