From 160785587667cc0d927f85e44c139ec9dde13a9e Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 25 十一月 2019 14:30:13 +0800 Subject: [PATCH] 原来的 IOS 工程舍弃(注:没有合并其他组员的代码) --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs | 40 +++++++++++++++++++++++++++++++++++----- 1 files changed, 35 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 a79ddb8..c30210e 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs @@ -91,6 +91,13 @@ this.BindChidrenEvent(view, chidrenBindMode); } + else if (view is ImageView) + { + view.MouseUpEventHandler -= ChildrenUpEvent; + view.MouseDownEventHandler -= ChildrenDownEvent; + + this.BindChidrenEvent(view, chidrenBindMode); + } else if (view is ViewGroup) { ViewGroup groupContr = (ViewGroup)view; @@ -124,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; @@ -134,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; @@ -182,7 +202,6 @@ //缁戝畾瀛愭帶浠朵簨浠� this.BindChidrenEvent(view, chidrenBindMode); - } #endregion @@ -215,8 +234,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