From 2109463fab2eb1caed189e4f258e0e763c5cea7b Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期四, 07 十一月 2019 11:58:53 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into dev-wjc --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/TextInputControls/TextInputExControl.cs | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/TextInputControls/TextInputExControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/TextInputControls/TextInputExControl.cs index 6d9db74..23821be 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/TextInputControls/TextInputExControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/TextInputControls/TextInputExControl.cs @@ -16,6 +16,10 @@ /// </summary> public Action FinishInputEvent = null; /// <summary> + /// 鏈�澶ц緭鍏ラ暱搴�(鐩墠鍙拡瀵规寜涓嬪洖杞﹂敭鏃惰繘琛屾娴�,瓒呰繃鏃�,涓嶄細璋冪敤FinishInputEvent) + /// </summary> + public int MaxByte = 0; + /// <summary> /// 鏂囨湰鏄惁涓洪粦鑹插瓧浣� /// </summary> private bool IsTextBlack = false; @@ -63,6 +67,18 @@ /// <param name="view"></param> private void EditorEnterEvent(View view) { + if (this.MaxByte != 0) + { + if (Encoding.UTF8.GetBytes(this.Text.Trim()).Length > this.MaxByte) + { + //杈撳叆鍐呭杩囬暱,鏈�澶0}瀛楄妭 + string msg = Language.StringByID(R.MyInternationalizationString.uInputContentIsOverLengthMsg); + msg.Replace("{0}", this.MaxByte.ToString()); + var contr = new ShowMsgControl(ShowMsgType.Error, msg); + contr.Show(); + return; + } + } this.TextColor = UserCenterColor.Current.TextGrayColor3; this.IsTextBlack = false; this.FinishInputEvent?.Invoke(); -- Gitblit v1.8.0