From ade5917841b0fdcb1df7353ef7c56b1a1bdc9282 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 22 九月 2020 10:03:32 +0800
Subject: [PATCH] 删除 Gateway.Ios文件

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressBar.cs |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressBar.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressBar.cs
index 1b60ac2..7edeaa4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressBar.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressBar.cs
@@ -38,13 +38,13 @@
         public static void Show(string text = "")
         {
             m_value = 0;
-            Application.RunOnMainThread(() =>
+            HdlThreadLogic.Current.RunMain(() =>
             {
                 if (Common.CommonPage.Loading.Visible == false && notShow == false)
                 {
                     Common.CommonPage.Loading.Start(text);
                 }
-            });
+            }, ShowErrorMode.NO);
         }
 
         /// <summary>
@@ -58,8 +58,8 @@
             if (coerce == true)
             {
                 notClose = false;
-            }
-            Application.RunOnMainThread(() =>
+            }
+            HdlThreadLogic.Current.RunMain(() =>
             {
                 if (Common.CommonPage.Loading.Visible == true && notClose == false)
                 {
@@ -67,8 +67,8 @@
                     notShow = false;
                     notClose = false;
                     notSetValue = false;
-                }
-            });
+                }
+            }, ShowErrorMode.NO);
         }
 
         /// <summary>
@@ -79,6 +79,10 @@
         {
             m_value += value;
             int value2 = (int)((m_value / Max) * 100);
+            if (value2 > 100)
+            {
+                value2 = 100;
+            }
 
             SetValue(value2.ToString() + "%");
         }
@@ -92,6 +96,10 @@
         {
             m_value += value;
             int value2 = (int)((m_value / Max) * 100);
+            if (value2 > 100)
+            {
+                value2 = 100;
+            }
 
             SetValue(value2.ToString() + "% " + text);
         }
@@ -105,12 +113,12 @@
             if (notSetValue == true)
             {
                 return;
-            }
-            Application.RunOnMainThread(() =>
+            }
+            HdlThreadLogic.Current.RunMain(() =>
             {
                 //loading.Text = text;
-                Common.CommonPage.Loading.Text = text + appendText;
-            });
+                Common.CommonPage.Loading.Text = text + appendText;
+            }, ShowErrorMode.NO);
         }
 
         /// <summary>

--
Gitblit v1.8.0