From dce6c3481a37216292724013ff9d2b75ceb82f86 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 10 六月 2020 15:47:28 +0800
Subject: [PATCH] 添加小度的代码

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressRowBar.cs |   39 +++++++++++++++++++++++++++++++++------
 1 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressRowBar.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressRowBar.cs
index aebe897..5cd4dcd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressRowBar.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressRowBar.cs
@@ -39,8 +39,14 @@
         /// <summary>
         /// 琛屾潯绫诲瀷鐨勮繘搴︽潯鎺т欢
         /// </summary>
-        /// <param name="width">闈炵湡瀹炲��</param>
-        /// <param name="height">闈炵湡瀹炲��</param>
+        /// <param name="width">
+        /// <para>妯″紡1:浼氬姩鐨勯偅涓繘搴︽潯鐨勫搴�(闈炵湡瀹炲��)</para>
+        /// <para>妯″紡2:杩涘害鏉″湪鎸佺画鏃犻檺鐨勬潵鍥炵Щ鍔ㄧ殑鍖哄煙瀹藉害(闈炵湡瀹炲��)</para>
+        /// </param>
+        /// <param name="height">
+        /// <para>妯″紡1:浼氬姩鐨勯偅涓繘搴︽潯鐨勯珮搴�(闈炵湡瀹炲��)</para>
+        /// <para>妯″紡2:杩涘害鏉″湪鎸佺画鏃犻檺鐨勬潵鍥炵Щ鍔ㄧ殑楂樺害(闈炵湡瀹炲��)</para>
+        /// </param>
         public ProgressRowBar(int width, int height)
         {
             this.Height = Application.GetRealHeight(height);
@@ -56,7 +62,10 @@
         /// <summary>
         /// 妯″紡1  璇ユā寮忎负锛氭墜鍔ㄥ~鍐欒繘搴﹀��
         /// </summary>
-        /// <param name="showText">鏄惁鍦ㄨ繘搴︽潯涓婃柟鏄剧ず鏁板�肩櫨鍒嗘瘮</param>
+        /// <param name="showText">
+        /// <para>鏄惁鍦ㄨ繘搴︽潯涓婃柟鏄剧ず鏁板�肩櫨鍒嗘瘮</para>
+        /// <para>璇风‘淇濇帶浠剁殑涓婃柟鏈夎冻澶熺殑鍖哄煙(娉�:璇蜂笉瑕佹墿澶ф鎺т欢鐨勯珮搴�)</para>
+        /// </param>
         public void StartMode1(bool showText = false)
         {
             if (m_ModeDiv != -1) { return; }
@@ -74,7 +83,7 @@
             {
                 //杩涘害鍊兼枃鏈�
                 this.frameProgressBack = new FrameLayout();
-                frameProgressBack.Width = Application.GetRealWidth(84);
+                frameProgressBack.Width = Application.GetRealWidth(120);
                 frameProgressBack.Height = Application.GetRealHeight(60);
                 frameProgressBack.Y = this.Y - Application.GetRealHeight(60);
                 frameProgressBack.X = this.X - Application.GetRealWidth(84) / 2;
@@ -82,12 +91,25 @@
 
                 var btnProgressPic = new PicViewControl(84, 60);
                 btnProgressPic.UnSelectedImagePath = "Item/ProgressMsg.png";
+                btnProgressPic.Gravity = Gravity.CenterHorizontal;
                 frameProgressBack.AddChidren(btnProgressPic);
-                this.btnProgressTextView = new NormalViewControl(84, 45, true);
+                this.btnProgressTextView = new NormalViewControl(120, 45, true);
                 btnProgressTextView.TextSize = 10;
                 btnProgressTextView.TextAlignment = TextAlignment.Center;
                 btnProgressTextView.Text = "0%";
+                btnProgressTextView.Gravity = Gravity.CenterHorizontal;
                 frameProgressBack.AddChidren(btnProgressTextView);
+            }
+        }
+
+        /// <summary>
+        /// 閲嶇疆杩涘害鏉�(鍙妯″紡1鏈夋晥)
+        /// </summary>
+        public void ResetProgressBar()
+        {
+            if (this.m_ModeDiv == 1 && this.btnProgressBar != null)
+            {
+                this.btnProgressBar.Width = 0;
             }
         }
 
@@ -124,6 +146,11 @@
             HdlThreadLogic.Current.RunMain(() =>
             {
                 int width = (int)(value * this.Width);
+                if (btnProgressBar.Width >= width)
+                {
+                    //涓嶈兘璁╄繘搴︽潯寰�鍥炶蛋
+                    return;
+                }
                 btnProgressBar.Width = width;
                 if (this.btnProgressTextView != null)
                 {
@@ -142,7 +169,7 @@
         /// <summary>
         /// 妯″紡2  璇ユā寮忎负锛氫笉鑳芥墜鍔ㄦ寚瀹氳繘搴﹀��,鐢卞唴閮ㄧ嚎绋嬪鐞�,杩涘害鏉″湪鎸佺画鏃犻檺鐨勬潵鍥炵Щ鍔�
         /// </summary>
-        /// <param name="proWidth">浼氱Щ鍔ㄧ殑杩涘害鏉$殑瀹藉害(闈炵湡瀹炲��)</param>
+        /// <param name="proWidth">鎸佺画鏃犻檺鐨勬潵鍥炵Щ鍔ㄧ殑杩涘害鏉$殑瀹藉害(闈炵湡瀹炲��)</param>
         public void StartMode2(int proWidth = 100)
         {
             if (m_ModeDiv != -1) { return; }

--
Gitblit v1.8.0