From 05ce435c3b58e53eeab04c672affdeeab75f3036 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 15 十一月 2019 14:41:39 +0800
Subject: [PATCH] 2019.11.15-1

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 55 insertions(+), 5 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs
index 8dba4e5..7b0c5ef 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs
@@ -36,6 +36,17 @@
         /// </summary>
         public int chidrenYaxis = 0;
 
+        /// <summary>
+        /// 鍦嗚搴�(瀹夊崜鍜孖OS鎴栬闇�瑕侀缂栬瘧)
+        /// </summary>
+        public uint RadiusEx
+        {
+            set
+            {
+                this.Radius = value;
+            }
+        }
+
         #endregion
 
         #region 鈻� 鍒濆鍖朹____________________________
@@ -50,7 +61,15 @@
 
             this.MouseUpEventHandler += ChildrenUpEvent;
             this.MouseDownEventHandler += ChildrenDownEvent;
-        }
+        }
+
+        /// <summary>
+        /// 鍋氭垚涓�涓櫘閫氱殑FrameLayout鎺т欢
+        /// </summary>
+        /// <param name="flage">娌″暐鐢ㄧ殑涓滆タ</param>
+        public FrameLayoutControl(bool flage)
+        {
+        }
 
         #endregion
 
@@ -71,6 +90,13 @@
                 button.MouseDownEventHandler -= ChildrenDownEvent;
 
                 this.BindChidrenEvent(view, chidrenBindMode);
+            }
+            else if (view is ImageView)
+            {
+                view.MouseUpEventHandler -= ChildrenUpEvent;
+                view.MouseDownEventHandler -= ChildrenDownEvent;
+
+                this.BindChidrenEvent(view, chidrenBindMode);
             }
             else if (view is ViewGroup)
             {
@@ -105,7 +131,11 @@
         /// <param name="chidrenBindMode"></param>
         private void BindChidrenEvent(View view, ChidrenBindMode chidrenBindMode)
         {
-            if (view is ButtonBase && chidrenBindMode != ChidrenBindMode.NotBind)
+            if (chidrenBindMode == ChidrenBindMode.NotBind)
+            {
+                return;
+            }
+            if (view is ButtonBase)
             {
                 //涓哄瓙鎺т欢娣诲姞浜嬩欢
                 ButtonBase button = (ButtonBase)view;
@@ -115,7 +145,16 @@
                 button.ButtonClickEvent += ChildrenUpEvent;
                 button.MouseDownEventHandler += ChildrenDownEvent;
             }
-            else if (view is ViewGroup && chidrenBindMode != ChidrenBindMode.NotBind)
+            else if (view is ImageView)
+            {
+                //鑷韩涔熸坊鍔犱簨浠�
+                view.MouseUpEventHandler -= ChildrenUpEvent;
+                view.MouseDownEventHandler -= ChildrenDownEvent;
+
+                view.MouseUpEventHandler += ChildrenUpEvent;
+                view.MouseDownEventHandler += ChildrenDownEvent;
+            }
+            else if (view is ViewGroup)
             {
                 //涓哄瓙鎺т欢娣诲姞浜嬩欢
                 ViewGroup groupContr = (ViewGroup)view;
@@ -196,8 +235,19 @@
                 //LOG鍑哄姏
                 this.WriteLog();
             }
-            //璋冪敤濮旀墭
-            ButtonClickEvent?.Invoke(sender, e);
+            try
+            {
+                //璋冪敤濮旀墭
+                ButtonClickEvent?.Invoke(sender, e);
+            }
+            catch (Exception ex)
+            {
+                //鍑虹幇鏈煡閿欒
+                var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError));
+                alert.Show();
+                //Log鍑哄姏
+                HdlLogLogic.Current.WriteLog(ex);
+            }
         }
 
         #endregion

--
Gitblit v1.8.0