| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | |
| | | |
| | | btnConfirm.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //btnConfirm.IsSelected = false; |
| | | if (string.IsNullOrEmpty(editText.Text.Trim()) || list.Contains(editText.Text.Trim())) |
| | | var text = editText.Text.Trim(); |
| | | Regex regtest = new Regex(@"\p{Cs}"); |
| | | Match match = regtest.Match(text); |
| | | if (match.Success) |
| | | { |
| | | HDLCommon.Current.ShowAlert(Language.StringByID(StringId.CannotEnterSpecialCharacters)); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(text) || list.Contains(text)) |
| | | { |
| | | //if (titleId == StringId.ModifyMemberNickname) |
| | | //{ |
| | | // return; |
| | | //} |
| | | string tipMsgString = ""; |
| | | if (string.IsNullOrEmpty(editText.Text.Trim())) |
| | | if (string.IsNullOrEmpty(text)) |
| | | { |
| | | tipMsgString = Language.StringByID(errorId_IsNullOrEmpty); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | callBackAction(editText.Text.Trim()); |
| | | callBackAction(text); |
| | | dialog.Close(); |
| | | }; |
| | | } |
| | |
| | | Text = editParater, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | SecureTextEntry = encryption, |
| | | //SecureTextEntry = encryption, |
| | | //TextAlignment = TextAlignment.CenterLeft , |
| | | }; |
| | | editView.AddChidren(etParater); |
| | | if(encryption) |
| | | { |
| | | etParater.SecureTextEntry = encryption; |
| | | } |
| | | |
| | | Button btnClear = new Button() |
| | | { |
| | | X = Application.GetRealWidth(218-25), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | UnSelectedImagePath = "Public/ClearIcon.png", |
| | | }; |
| | | editView.AddChidren(btnClear); |
| | | |
| | | btnClear.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | etParater.Text = ""; |
| | | }; |
| | | |
| | | etParater.TextChangeEventHandler = (sender, e) => |
| | | { |
| | |
| | | |
| | | var btnConfrim = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(320), |
| | | X = Application.GetRealWidth(160), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextID = StringId.Complete, |
| | | TextID = StringId.Confirm, |
| | | }; |
| | | topView.AddChidren(btnConfrim); |
| | | |