From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
index 5e041ad..02e26e4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
@@ -20,6 +20,10 @@
/// </summary>
public Action<string> FinishInputEvent = null;
/// <summary>
+ /// 瀵嗙爜杈撳叆绫诲瀷
+ /// </summary>
+ public bool SecureTextEntry = false;
+ /// <summary>
/// 楠岃瘉鐮侀暱搴�
/// </summary>
private int CodeLenth = 0;
@@ -60,12 +64,16 @@
frameCode.X = i * Application.GetRealWidth(115 + 49);
frameCode.Width = Application.GetRealWidth(115);
frameCode.Height = Application.GetRealHeight(104);
- frameCode.Radius = (uint)Application.GetMinRealAverage(6);
+ frameCode.Radius = (uint)Application.GetRealHeight(17);
frameCode.BorderWidth = 1;
frameCode.BorderColor = UserCenterColor.Current.TextFrameColor;
this.AddChidren(frameCode);
var txtCode = new TextInputControl(frameCode.Width, frameCode.Height, false);
+ if (SecureTextEntry == true)
+ {
+ txtCode.SecureTextEntry = true;
+ }
txtCode.Name = i.ToString();
txtCode.TextAlignment = TextAlignment.Center;
frameCode.AddChidren(txtCode);
@@ -76,6 +84,8 @@
txtCode.FoucsChanged += this.TxtCode_FoucsChangedEvent;
//鍊兼敼鍙樹簨浠�
txtCode.TextChangeEventHandler += this.TxtCode_TextChangeEvent;
+ //閿洏浜嬩欢
+ txtCode.KeyEventAction += this.TxtCode_KeyEvent;
}
}
@@ -164,6 +174,26 @@
}
}
+ /// <summary>
+ /// 閿洏浜嬩欢
+ /// </summary>
+ /// <param name="keysCode"></param>
+ private void TxtCode_KeyEvent(object sender, string keysCode)
+ {
+ if (keysCode == "Del")
+ {
+ var txtCode = (TextInputControl)sender;
+ if (txtCode.Text == string.Empty)
+ {
+ int index = Convert.ToInt32(txtCode.Name);
+ if (dicCodeControls.ContainsKey(index - 1) == true)
+ {
+ dicCodeControls[index - 1].Foucs = true;
+ }
+ }
+ }
+ }
+
#endregion
#region 鈻� 涓�鑸柟娉昣__________________________
--
Gitblit v1.8.0