From 6fa9d69da922c8049f5acfcbb9ce9fd26811024c Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 16 四月 2020 17:10:57 +0800
Subject: [PATCH] 请合并代码

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs |   39 +++++++++++++++++++++++++--------------
 1 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs
index 19f8af4..539ff34 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs
@@ -29,7 +29,14 @@
                 return m_Current;
             }
         }
-
+        /// <summary>
+        /// 娑堟伅鎺т欢鍗曞嚮鐨勪簨浠�
+        /// </summary>
+        public Action MsgClickEvent = null;
+        /// <summary>
+        /// 鐣岄潰鍏抽棴鐨勪簨浠�
+        /// </summary>
+        public Action CloseEvent = null;
         /// <summary>
         /// 瀹瑰櫒鎺т欢
         /// </summary>
@@ -72,29 +79,26 @@
         /// </summary>
         private void InitProgressFormBar()
         {
-            var nowForm = UserView.HomePage.Instance.GetChildren(UserView.HomePage.Instance.ChildrenCount - 1);
-            if (nowForm == null || (nowForm is ViewGroup) == false)
-            {
-                //杩欑鎯呭喌搴旇涓嶅瓨鍦�
-                var alert = new ShowMsgControl(ShowMsgType.Error, "ERROR:Not Found The ActionForm!");
-                alert.Show();
-                return;
-            }
             //瀹夊崜鍙互鐐瑰嚮绯荤粺鐨勮繑鍥為敭
             this.oldScrollEnabled = UserView.HomePage.Instance.ScrollEnabled;
             UserView.HomePage.Instance.ScrollEnabled = false;
             Shared.Common.CommonPage.BackKeyCanClick = false;
+
             this.oldPrigressVisible = Common.CommonPage.Loading.Visible;
             if (oldPrigressVisible == true)
             {
                 //鍦嗗舰杩涘害鏉′复鏃跺叧闂�
                 Common.CommonPage.Loading.Hide();
             }
-
             //瀹瑰櫒
             bodyFrameLayout = new FrameLayout();
             bodyFrameLayout.BackgroundColor = UserCenterColor.Current.DialogBackColor;
-            ((ViewGroup)nowForm).AddChidren(bodyFrameLayout);
+            Common.CommonPage.Instance.AddChidren(bodyFrameLayout);
+            //var nowForm = UserView.HomePage.Instance.GetChildren(UserView.HomePage.Instance.ChildrenCount - 1);
+            //if (nowForm != null && (nowForm is ViewGroup) == true)
+            //{
+            //    ((ViewGroup)nowForm).AddChidren(bodyFrameLayout);
+            //}
 
             var frameBack = new FrameLayout();
             frameBack.Width = Application.GetRealWidth(674);
@@ -102,7 +106,7 @@
             frameBack.BackgroundColor = UserCenterColor.Current.White;
             frameBack.Gravity = Gravity.CenterHorizontal;
             frameBack.Y = Application.GetRealHeight(683);
-            frameBack.Radius = 6;
+            frameBack.Radius = (uint)Application.GetRealHeight(17);
             bodyFrameLayout.AddChidren(frameBack);
 
             //杩涘害鏄剧ず鏂囨湰
@@ -111,6 +115,10 @@
             btnText.TextColor = UserCenterColor.Current.TextGrayColor1;
             btnText.TextAlignment = TextAlignment.Center;
             frameBack.AddChidren(btnText);
+            btnText.ButtonClickEvent += (sender, e) =>
+            {
+                this.MsgClickEvent?.Invoke();
+            };
 
             //杩涘害鏉�
             var btnProRow = new FrameLayout();
@@ -124,7 +132,6 @@
             this.btnProgressBar = new FrameLayout();
             btnProgressBar.Width = 0;
             btnProgressBar.Height = btnProRow.Height;
-            btnProgressBar.Radius = btnProRow.Radius;
             btnProgressBar.BackgroundColor = 0xfffb744a;
             btnProgressBar.Radius = (uint)Application.GetRealHeight(29) / 2;
             btnProRow.AddChidren(btnProgressBar);
@@ -139,7 +146,7 @@
             var btnProgressPic = new PicViewControl(84, 60);
             btnProgressPic.UnSelectedImagePath = "Item/ProgressMsg.png";
             frameProgress.AddChidren(btnProgressPic);
-            this.btnProgressView = new NormalViewControl(84, 32, true);
+            this.btnProgressView = new NormalViewControl(84, 45, true);
             btnProgressView.TextSize = 10;
             btnProgressView.TextAlignment = TextAlignment.Center;
             btnProgressView.Text = "0%";
@@ -257,6 +264,10 @@
                 btnProgressView = null;
                 frameProgress = null;
                 btnProgressBar = null;
+                this.MsgClickEvent = null;
+                //鍏抽棴浜嬩欢
+                this.CloseEvent?.Invoke();
+                this.CloseEvent = null;
             });
         }
 

--
Gitblit v1.8.0