From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs | 69 +++++++++++++++++----------------- 1 files changed, 35 insertions(+), 34 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs index 67f8470..ebaf638 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs @@ -13,84 +13,85 @@ /// <summary> /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) - /// </summary> - public void ShowForm() - { - //鍒濆鍖栦腑閮ㄦ帶浠� - this.InitMiddleFrame(); + /// </summary> + public void ShowForm() + { + //鍒濆鍖栦腑閮ㄦ帶浠� + this.InitMiddleFrame(); } - /// <summary> - /// 鍒濆鍖栦腑閮ㄦ帶浠� - /// </summary> - private void InitMiddleFrame() + /// <summary> + /// 鍒濆鍖栦腑閮ㄦ帶浠� + /// </summary> + private void InitMiddleFrame() { - uint roundHeigth = (uint)Application.GetMinRealAverage(6); + uint roundHeigth = (uint)this.GetRealSizeEx(17); //鑳屾櫙妗� var frameBack = new FrameLayout(); - frameBack.Width = Application.GetRealWidth(688); - frameBack.Height = Application.GetRealHeight(968); - frameBack.Y = Application.GetRealHeight(498); + 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 = Application.GetRealHeight(100); + frameTop.Height = this.GetRealSizeEx(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.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 = Application.GetRealHeight(274) - frameTop.Height / 2; + 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 = Application.GetRealHeight(694) - frameBottom.Height / 2; + 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 = Application.GetMinRealAverage(294); - btnIcon.Width = Application.GetMinRealAverage(294); - btnIcon.Radius = (uint)Application.GetMinRealAverage(294) / 2; - btnIcon.Y = Application.GetRealHeight(121); + 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.ImagePath = UserCenterResourse.UserInfo.UserIconFile; + btnIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(HdlFileNameResourse.UserHeadIconFile); frameBack.AddChidren(btnIcon); //鐢ㄦ埛鍚� - var btnUser = new NormalViewControl(frameBack.Width, Application.GetRealHeight(46), false); - btnUser.Y = Application.GetRealHeight(147); - btnUser.Text = UserCenterResourse.UserInfo.UserName; + var btnUser = new NormalViewControl(frameBack.Width, this.GetRealHeight(50), false); + btnUser.IsBold = true; + btnUser.Y = btnIcon.Bottom + this.GetRealSizeEx(23); + btnUser.Text = HdlUserCenterResourse.UserInfo.NickName; btnUser.TextAlignment = TextAlignment.Center; btnUser.TextColor = UserCenterColor.Current.TextGrayColor2; - frameDetail.AddChidren(btnUser); + frameBack.AddChidren(btnUser); //浜岀淮鐮� - var btnQrCode = new PicViewControl(236, 236); - btnQrCode.ImageBytes = QRCode.BytesFromText(UserCenterResourse.UserInfo.Account, Application.GetMinRealAverage(236), Application.GetMinRealAverage(236)); + var btnQrCode = new PicViewControl(this.GetRealSizeEx(236), this.GetRealSizeEx(236), false); + btnQrCode.ImageBytes = QRCode.BytesFromText(HdlUserCenterResourse.UserInfo.Account, this.GetPictrueRealSize(236), this.GetPictrueRealSize(236)); btnQrCode.Gravity = Gravity.CenterHorizontal; - btnQrCode.Y = Application.GetRealHeight(262); - frameDetail.AddChidren(btnQrCode); + btnQrCode.Y = btnUser.Bottom + this.GetRealSizeEx(69); + frameBack.AddChidren(btnQrCode); //鎵竴鎵坊鍔犳垚鍛� - var btnMsg = new NormalViewControl(frameBack.Width, Application.GetRealHeight(58), false); - btnMsg.Y = Application.GetRealHeight(533); + 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; - frameDetail.AddChidren(btnMsg); + frameBack.AddChidren(btnMsg); } #endregion -- Gitblit v1.8.0