From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期三, 22 六月 2022 11:22:18 +0800 Subject: [PATCH] 修改引用路径 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs | 295 ++++++++++++++++++++++++++++++---------------------------- 1 files changed, 153 insertions(+), 142 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs old mode 100755 new mode 100644 index 24b5d62..a424792 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs @@ -1,142 +1,153 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Text; - -namespace Shared.Phone.UserCenter -{ - /// <summary> - /// FrameLayout鐨勬渶鍒濆師鍨� - /// </summary> - public class FrameLayoutBase : FrameLayout - { - #region 鈻� 鍙橀噺澹版槑___________________________ - - /// <summary> - /// 璁剧疆鑳藉惁瑙︾偣鍑讳簨浠� - /// </summary> - public bool CanClick = true; - /// <summary> - /// 澹版槑姝ゅ彉閲�,鏃ㄥ湪瀛愮嚎绋嬩篃鑳藉鍘昏幏鍙栦竴涓帶浠剁殑涓婚敭 - /// </summary> - public string MainKey = string.Empty; - /// <summary> - /// 鎺т欢鐨勭偣鍑讳簨浠�(鑷畾涔夊皝瑁呬簨浠�,姝や簨浠惰璁ゅ彲涓烘墽琛屾寜閽寜涓嬩簨浠�,鍙桟anClick灞炴�ф帶鍒�) - /// </summary> - public Action<object, MouseEventArgs> ButtonClickEvent = null; - - #endregion - - #region 鈻� 鍒濆鍖朹____________________________ - - /// <summary> - /// FrameLayout鐨勬渶鍒濆師鍨� - /// </summary> - public FrameLayoutBase() - { - //鐐瑰嚮浜嬩欢 - this.MouseUpEventHandler += ButtonBase_MouseUpEventHandler; - } - - #endregion - - #region 鈻� 鐐瑰嚮浜嬩欢___________________________ - - /// <summary> - /// 鐐瑰嚮浜嬩欢 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void ButtonBase_MouseUpEventHandler(object sender, MouseEventArgs e) - { - if (ButtonClickEvent == null) - { - this.MouseUpEventHandler -= ButtonBase_MouseUpEventHandler; - return; - } - //2020.05.14杩藉姞IsFormAdding:鐣岄潰杩樺湪鍔犺浇涓�,涓嶈兘鍐嶇偣鍑� - if (CanClick == true && ControlCommonResourse.IsFormAdding == false) - { - //Log鍑哄姏 - this.WriteLog(); - - try - { - this.ButtonClickEvent(this, e); - } - catch (Exception ex) - { - //鍑虹幇鏈煡閿欒 - var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError)); - alert.Show(); - //Log鍑哄姏 - HdlLogLogic.Current.WriteLog(ex); - } - } - } - - #endregion - - #region 鈻� 涓�鑸柟娉昣__________________________ - - /// <summary> - /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害 - /// </summary> - /// <param name="i_size"></param> - /// <returns></returns> - public int GetPictrueRealSize(int i_size) - { - return HdlControlLogic.Current.GetPictrueRealSize(i_size); - } - - /// <summary> - /// 鎺т欢鎽ф瘉 - /// </summary> - public override void RemoveFromParent() - { - ButtonClickEvent = null; - - if (this.Parent != null) - { - base.RemoveFromParent(); - } - } - - #endregion - - #region 鈻� Log鍑哄姏____________________________ - - /// <summary> - /// 璇ユ帶浠舵墍灞炵殑鐣岄潰鍚嶅瓧 - /// </summary> - public string formName = null; - /// <summary> - /// Log鍑哄姏 - /// </summary> - private void WriteLog() - { - if (formName == null) - { - formName = string.Empty; - View myView = this.Parent; - for (; ; ) - { - if (myView == null) - { - break; - } - else if (myView is CommonFormBase) - { - //杩欎釜鎺т欢鎵�灞炵殑鐣岄潰 - formName = ((CommonFormBase)myView).FormID; - break; - } - myView = myView.Parent; - } - } - HdlLogLogic.Current.WriteLog(1, formName + "鐨刐Y" + this.Y + "]琚偣鍑�"); - } - - #endregion - - } -} +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter +{ + /// <summary> + /// FrameLayout鐨勬渶鍒濆師鍨� + /// </summary> + public class FrameLayoutBase : FrameLayout + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 璁剧疆鑳藉惁瑙︾偣鍑讳簨浠� + /// </summary> + public bool CanClick = true; + /// <summary> + /// 澹版槑姝ゅ彉閲�,鏃ㄥ湪瀛愮嚎绋嬩篃鑳藉鍘昏幏鍙栦竴涓帶浠剁殑涓婚敭 + /// </summary> + public string MainKey = string.Empty; + /// <summary> + /// 鎺т欢鐨勭偣鍑讳簨浠�(鑷畾涔夊皝瑁呬簨浠�,姝や簨浠惰璁ゅ彲涓烘墽琛屾寜閽寜涓嬩簨浠�,鍙桟anClick灞炴�ф帶鍒�) + /// </summary> + public Action<object, MouseEventArgs> ButtonClickEvent = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// FrameLayout鐨勬渶鍒濆師鍨� + /// </summary> + public FrameLayoutBase() + { + //鐐瑰嚮浜嬩欢 + this.MouseUpEventHandler += ButtonBase_MouseUpEventHandler; + } + + #endregion + + #region 鈻� 鐐瑰嚮浜嬩欢___________________________ + + /// <summary> + /// 鐐瑰嚮浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ButtonBase_MouseUpEventHandler(object sender, MouseEventArgs e) + { + if (ButtonClickEvent == null) + { + this.MouseUpEventHandler -= ButtonBase_MouseUpEventHandler; + return; + } + //2020.05.14杩藉姞IsFormAdding:鐣岄潰杩樺湪鍔犺浇涓�,涓嶈兘鍐嶇偣鍑� + if (CanClick == true && ControlCommonResourse.IsFormAdding == false) + { + //Log鍑哄姏 + this.WriteLog(); + + try + { + this.ButtonClickEvent(this, e); + } + catch (Exception ex) + { + //鍑虹幇鏈煡閿欒 + var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError)); + alert.Show(); + //Log鍑哄姏 + HdlLogLogic.Current.WriteLog(ex); + } + } + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害 + /// </summary> + /// <param name="i_size"></param> + /// <returns></returns> + public int GetPictrueRealSize(int i_size) + { + return HdlControlLogic.Current.GetPictrueRealSize(i_size); + } + + /// <summary> + /// 鎺т欢鎽ф瘉 + /// </summary> + public override void RemoveFromParent() + { + ButtonClickEvent = null; + + if (this.Parent != null) + { + base.RemoveFromParent(); + } + } + + /// <summary> + /// 鈽嗏槅绉婚櫎鍏ㄩ儴鎺т欢鈽嗏槅 + /// </summary> + public override void RemoveAll() + { + if (this.Parent != null) + { + base.RemoveAll(); + } + } + + #endregion + + #region 鈻� Log鍑哄姏____________________________ + + /// <summary> + /// 璇ユ帶浠舵墍灞炵殑鐣岄潰鍚嶅瓧 + /// </summary> + public string formName = null; + /// <summary> + /// Log鍑哄姏 + /// </summary> + private void WriteLog() + { + if (formName == null) + { + formName = string.Empty; + View myView = this.Parent; + for (; ; ) + { + if (myView == null) + { + break; + } + else if (myView is CommonFormBase) + { + //杩欎釜鎺т欢鎵�灞炵殑鐣岄潰 + formName = ((CommonFormBase)myView).FormID; + break; + } + myView = myView.Parent; + } + } + HdlLogLogic.Current.WriteLog(1, formName + "鐨刐Y" + this.Y + "]琚偣鍑�"); + } + + #endregion + + } +} -- Gitblit v1.8.0