| | |
| | | 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);
|
| | |
| | | txtCode.FoucsChanged += this.TxtCode_FoucsChangedEvent;
|
| | | //值改变事件
|
| | | txtCode.TextChangeEventHandler += this.TxtCode_TextChangeEvent;
|
| | | //键盘事件
|
| | | txtCode.KeyEventAction += this.TxtCode_KeyEvent;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /// <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 ■ 一般方法___________________________
|