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/Common/Controls/CompoundControls/ProgressFormBar.cs | 69 +++++++++++++++++++++++++++++----- 1 files changed, 59 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs b/ZigbeeApp/Shared/Phone/Common/Controls/CompoundControls/ProgressFormBar.cs similarity index 75% rename from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs rename to ZigbeeApp/Shared/Phone/Common/Controls/CompoundControls/ProgressFormBar.cs index 6a66df9..48b8c2a 100644 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs +++ b/ZigbeeApp/Shared/Phone/Common/Controls/CompoundControls/ProgressFormBar.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace Shared.Phone.UserCenter +namespace Shared.Phone { /// <summary> /// 鐣岄潰绫诲瀷鐨勮繘搴︽潯鎺т欢 @@ -46,6 +46,10 @@ /// </summary> private NormalViewControl btnText = null; /// <summary> + /// 鏍囬鎺т欢 + /// </summary> + private NormalViewControl btnTitle = null; + /// <summary> /// 杩涘害鏉℃帶浠� /// </summary> private ProgressRowBar btnProgressBar = null; @@ -65,12 +69,15 @@ /// <summary> /// 鍒濆鍖栬繘搴︽潯 /// </summary> - private void InitProgressFormBar() + private void InitProgressFormBar(bool i_hadTitle) { + //鎷ユ湁鏍囬鏃�,鎵╁ぇ鐨勯珮搴� + int titleValue = 40; + //瀹夊崜鍙互鐐瑰嚮绯荤粺鐨勮繑鍥為敭 this.oldScrollEnabled = UserView.HomePage.Instance.ScrollEnabled; UserView.HomePage.Instance.ScrollEnabled = false; - Shared.Common.CommonPage.BackKeyCanClick = false; + Common.Config.Instance.BackKeyCanClick = false; this.oldPrigressVisible = Common.CommonPage.Loading.Visible; if (oldPrigressVisible == true) @@ -84,17 +91,39 @@ Common.CommonPage.Instance.AddChidren(bodyFrameLayout); var frameBack = new FrameLayout(); + if (i_hadTitle == false) + { + frameBack.Y = Application.GetRealHeight(683); + frameBack.Height = Application.GetRealHeight(386); + } + else + { + frameBack.Y = Application.GetRealHeight(683 + titleValue / 2); + frameBack.Height = Application.GetRealHeight(386 + titleValue); + } frameBack.Width = Application.GetRealWidth(674); - frameBack.Height = Application.GetRealHeight(386); frameBack.BackgroundColor = UserCenterColor.Current.White; frameBack.Gravity = Gravity.CenterHorizontal; - frameBack.Y = Application.GetRealHeight(683); frameBack.Radius = (uint)Application.GetRealHeight(17); bodyFrameLayout.AddChidren(frameBack); //杩涘害鏄剧ず鏂囨湰 + this.btnTitle = new NormalViewControl(frameBack.Width, Application.GetRealHeight(58), false); + btnTitle.Y = Application.GetRealHeight(40); + btnTitle.TextColor = UserCenterColor.Current.TextGrayColor1; + btnTitle.TextAlignment = TextAlignment.Center; + frameBack.AddChidren(btnTitle); + + //杩涘害鏄剧ず鏂囨湰 this.btnText = new NormalViewControl(frameBack.Width, Application.GetRealHeight(58), false); - btnText.Y = Application.GetRealHeight(248); + if (i_hadTitle == false) + { + btnText.Y = Application.GetRealHeight(248); + } + else + { + btnText.Y = Application.GetRealHeight(248 + titleValue); + } btnText.TextColor = UserCenterColor.Current.TextGrayColor1; btnText.TextAlignment = TextAlignment.Center; frameBack.AddChidren(btnText); @@ -106,7 +135,14 @@ //杩涘害鏉� this.btnProgressBar = new ProgressRowBar(559, 29); btnProgressBar.Gravity = Gravity.CenterHorizontal; - btnProgressBar.Y = Application.GetRealHeight(161); + if (i_hadTitle == false) + { + btnProgressBar.Y = Application.GetRealHeight(161); + } + else + { + btnProgressBar.Y = Application.GetRealHeight(161 + titleValue); + } frameBack.AddChidren(btnProgressBar); btnProgressBar.StartMode1(true); } @@ -124,6 +160,18 @@ HdlThreadLogic.Current.RunMain(() => { btnText.Text = msg; + }, ShowErrorMode.NO); + } + + /// <summary> + /// 璁剧疆鏍囬淇℃伅 + /// </summary> + /// <param name="i_title"></param> + public void SetTitle(string i_title) + { + HdlThreadLogic.Current.RunMain(() => + { + btnTitle.Text = i_title; }, ShowErrorMode.NO); } @@ -173,14 +221,15 @@ /// <summary> /// 寮�鍚繘搴︽潯 /// </summary> - public void Start() + /// <param name="i_hadTitle">鏄惁鎷ユ湁鏍囬</param> + public void Start(bool i_hadTitle = false) { if (this.bodyFrameLayout == null) { HdlThreadLogic.Current.RunMain(() => { //鍒濆鍖栬繘搴︽潯 - this.InitProgressFormBar(); + this.InitProgressFormBar(i_hadTitle); }, ShowErrorMode.NO); } } @@ -201,7 +250,7 @@ //濡傛灉瀹冨師鏉ュ氨鏄笉鍙互婊戝姩鐨勮瘽锛屼笉澶勭悊 UserView.HomePage.Instance.ScrollEnabled = true; } - Shared.Common.CommonPage.BackKeyCanClick = true; + Common.Config.Instance.BackKeyCanClick = true; if (this.oldPrigressVisible == true) { //濡傛灉鍘熸潵鐨勮繘搴︽潯鏄彲瑙佺殑璇�,杩樺師鍥炲幓 -- Gitblit v1.8.0