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/CompoundControls/PswGestureInputControl.cs | 330 +++++++++++++++++++++++++++--------------------------- 1 files changed, 165 insertions(+), 165 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/PswGestureInputControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/PswGestureInputControl.cs old mode 100755 new mode 100644 index 50147ed..8cd1e8b --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/PswGestureInputControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/PswGestureInputControl.cs @@ -1,165 +1,165 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Text; - -namespace Shared.Phone.UserCenter -{ - /// <summary> - /// <para>鎵嬪娍瀵嗙爜杈撳叆鎺т欢(鑷埗鐨勬墜鍔胯緭鍏ョ被鍨�,璇峰疄鐜般�怓inishInputEvent銆戜簨浠�)</para> - /// <para>鏍囬鎺т欢鐨刌杞翠负0,涔熷氨鏄繖涓帶浠剁殑涓婇儴娌℃湁绌虹櫧鍖哄煙</para> - /// </summary> - public class PswGestureInputControl : FrameLayout - { - #region 鈻� 鍙橀噺澹版槑___________________________ - - /// <summary> - /// 瀵嗙爜杈撳叆瀹屾垚鐨勪簨浠� value1:瀵嗙爜 value2:瀵嗙爜闀垮害 - /// </summary> - public Action<string, int> FinishInputEvent = null; - /// <summary> - /// 鏍囬鎺т欢 - /// </summary> - public NormalViewControl btnTitle = null; - /// <summary> - /// 閿欒淇℃伅鎻愮ず鎺т欢 - /// </summary> - public NormalViewControl btnError = null; - /// <summary> - /// 鎵嬪娍鎺т欢(鏈夊彲鑳介渶瑕佽皟鏁村畠鐨勬湭鐭�) - /// </summary> - public GestureLockView gestureControl = null; - - #endregion - - #region 鈻� 鍒濆鍖朹____________________________ - - /// <summary> - /// <para>鎵嬪娍瀵嗙爜杈撳叆鎺т欢(鑷埗鐨勬墜鍔胯緭鍏ョ被鍨�,璇峰疄鐜般�怓inishInputEvent銆戜簨浠�)</para> - /// <para>鏍囬鎺т欢鐨刌杞翠负0,涔熷氨鏄繖涓帶浠剁殑涓婇儴娌℃湁绌虹櫧鍖哄煙</para> - /// </summary> - /// <param name="i_title">鍒濆鏍囬鏂囨湰淇℃伅</param> - public PswGestureInputControl(string i_title) - { - //鍔犻棿璺� - this.Width = Application.GetRealWidth(965); - this.Height = Application.GetRealHeight(1290); - - this.btnTitle = new NormalViewControl(Application.CurrentWidth, Application.GetRealWidth(75), false); - btnTitle.Width = this.Width; - btnTitle.TextAlignment = TextAlignment.Center; - btnTitle.TextSize = 18; - btnTitle.Text = i_title; - btnTitle.IsBold = true; - } - - /// <summary> - /// 鍒濆鍖栨帶浠� - /// </summary> - public void InitControl() - { - //鏍囬 - this.AddChidren(btnTitle); - - //閿欒淇℃伅鎻愮ず - this.btnError = new NormalViewControl(this.Width, Application.GetRealHeight(60), false); - btnError.Y = btnTitle.Bottom + Application.GetRealHeight(98); - btnError.TextAlignment = TextAlignment.Center; - btnError.TextColor = 0xfff75858; - this.AddChidren(btnError); - - this.gestureControl = new GestureLockView(); - gestureControl.Gravity = Gravity.CenterHorizontal; - gestureControl.Y = btnError.Bottom + Application.GetRealHeight(104); - gestureControl.Width = Application.GetRealWidth(786); - gestureControl.Height = Application.GetRealWidth(786); - //榛樿鍜屾纭� 鏃舵樉绀虹殑棰滆壊 - //gestureControl.LockViewCorrectColor = 0xfffc744b; - //閿欒鏃� 鏄剧ず鐨勯鑹� - //gestureControl.LockViewErrorColor = 0xfffc744b; - this.AddChidren(gestureControl); - - //婊戝姩缁撴潫 鍥炶皟瀵嗙爜缁撴灉鍜屽瘑鐮侀暱搴� - gestureControl.OnLockVerifyEvent += (selectNumStr, selectCount) => - { - btnError.Text = string.Empty; - HdlThreadLogic.Current.RunThread(() => - { - System.Threading.Thread.Sleep(1000); - HdlThreadLogic.Current.RunMain(() => - { - this.FinishInputEvent?.Invoke(selectNumStr, selectCount); - }); - }); - }; - } - - #endregion - - #region 鈻� 閲嶇疆鎺т欢___________________________ - - /// <summary> - /// 閲嶇疆鎺т欢 - /// </summary> - /// <param name="i_title">鏍囬淇℃伅</param> - /// <param name="clearError">鏄惁娓呴櫎閿欒淇℃伅</param> - public void ResetControlInfo(string i_title, bool clearError = true) - { - //鏍囬 - btnTitle.Text = i_title; - if (clearError == true) - { - //閿欒淇℃伅 - btnError.Text = string.Empty; - } - } - - #endregion - - #region 鈻� 閿欒淇℃伅璁剧疆_______________________ - - /// <summary> - /// 鏄剧ず閿欒鐨勪俊鎭� - /// </summary> - /// <param name="i_msg"></param> - public void SetErrorMsg(string i_msg) - { - //鑷楠岃瘉瀵嗙爜锛屾彁绀烘纭垨鑰呴敊璇� false涓烘樉绀虹孩鑹查敊璇�, 鑷閫夋嫨璋冪敤鏃舵満 - gestureControl.showCorrectStatus(false); - btnError.Text = i_msg; - } - - #endregion - - #region 鈻� 娣诲姞鍏抽棴鎸夐挳_______________________ - - /// <summary> - /// 娣诲姞鍏抽棴鎸夐挳 - /// </summary> - /// <returns></returns> - public IconViewControl AddCloseButton() - { - //鍏抽棴鎸夐挳 - var btnClose = new IconViewControl(86); - btnClose.X = this.Width - btnClose.IconSize - Application.GetRealHeight(46); - btnClose.UnSelectedImagePath = "Item/CancelIcon.png"; - this.AddChidren(btnClose); - - return btnClose; - } - - #endregion - - #region 鈻� 鎺т欢鎽ф瘉___________________________ - - /// <summary> - /// 鎺т欢鎽ф瘉 - /// </summary> - public override void RemoveFromParent() - { - FinishInputEvent = null; - base.RemoveFromParent(); - } - - #endregion - } -} +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter +{ + /// <summary> + /// <para>鎵嬪娍瀵嗙爜杈撳叆鎺т欢(鑷埗鐨勬墜鍔胯緭鍏ョ被鍨�,璇峰疄鐜般�怓inishInputEvent銆戜簨浠�)</para> + /// <para>鏍囬鎺т欢鐨刌杞翠负0,涔熷氨鏄繖涓帶浠剁殑涓婇儴娌℃湁绌虹櫧鍖哄煙</para> + /// </summary> + public class PswGestureInputControl : FrameLayout + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 瀵嗙爜杈撳叆瀹屾垚鐨勪簨浠� value1:瀵嗙爜 value2:瀵嗙爜闀垮害 + /// </summary> + public Action<string, int> FinishInputEvent = null; + /// <summary> + /// 鏍囬鎺т欢 + /// </summary> + public NormalViewControl btnTitle = null; + /// <summary> + /// 閿欒淇℃伅鎻愮ず鎺т欢 + /// </summary> + public NormalViewControl btnError = null; + /// <summary> + /// 鎵嬪娍鎺т欢(鏈夊彲鑳介渶瑕佽皟鏁村畠鐨勬湭鐭�) + /// </summary> + public GestureLockView gestureControl = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// <para>鎵嬪娍瀵嗙爜杈撳叆鎺т欢(鑷埗鐨勬墜鍔胯緭鍏ョ被鍨�,璇峰疄鐜般�怓inishInputEvent銆戜簨浠�)</para> + /// <para>鏍囬鎺т欢鐨刌杞翠负0,涔熷氨鏄繖涓帶浠剁殑涓婇儴娌℃湁绌虹櫧鍖哄煙</para> + /// </summary> + /// <param name="i_title">鍒濆鏍囬鏂囨湰淇℃伅</param> + public PswGestureInputControl(string i_title) + { + //鍔犻棿璺� + this.Width = Application.GetRealWidth(965); + this.Height = Application.GetRealHeight(1290); + + this.btnTitle = new NormalViewControl(Application.CurrentWidth, Application.GetRealWidth(75), false); + btnTitle.Width = this.Width; + btnTitle.TextAlignment = TextAlignment.Center; + btnTitle.TextSize = 18; + btnTitle.Text = i_title; + btnTitle.IsBold = true; + } + + /// <summary> + /// 鍒濆鍖栨帶浠� + /// </summary> + public void InitControl() + { + //鏍囬 + this.AddChidren(btnTitle); + + //閿欒淇℃伅鎻愮ず + this.btnError = new NormalViewControl(this.Width, Application.GetRealHeight(60), false); + btnError.Y = btnTitle.Bottom + Application.GetRealHeight(98); + btnError.TextAlignment = TextAlignment.Center; + btnError.TextColor = 0xfff75858; + this.AddChidren(btnError); + + this.gestureControl = new GestureLockView(); + gestureControl.Gravity = Gravity.CenterHorizontal; + gestureControl.Y = btnError.Bottom + Application.GetRealHeight(104); + gestureControl.Width = Application.GetRealWidth(786); + gestureControl.Height = Application.GetRealWidth(786); + //榛樿鍜屾纭� 鏃舵樉绀虹殑棰滆壊 + //gestureControl.LockViewCorrectColor = 0xfffc744b; + //閿欒鏃� 鏄剧ず鐨勯鑹� + //gestureControl.LockViewErrorColor = 0xfffc744b; + this.AddChidren(gestureControl); + + //婊戝姩缁撴潫 鍥炶皟瀵嗙爜缁撴灉鍜屽瘑鐮侀暱搴� + gestureControl.OnLockVerifyEvent += (selectNumStr, selectCount) => + { + btnError.Text = string.Empty; + HdlThreadLogic.Current.RunThread(() => + { + System.Threading.Thread.Sleep(1000); + HdlThreadLogic.Current.RunMain(() => + { + this.FinishInputEvent?.Invoke(selectNumStr, selectCount); + }); + }); + }; + } + + #endregion + + #region 鈻� 閲嶇疆鎺т欢___________________________ + + /// <summary> + /// 閲嶇疆鎺т欢 + /// </summary> + /// <param name="i_title">鏍囬淇℃伅</param> + /// <param name="clearError">鏄惁娓呴櫎閿欒淇℃伅</param> + public void ResetControlInfo(string i_title, bool clearError = true) + { + //鏍囬 + btnTitle.Text = i_title; + if (clearError == true) + { + //閿欒淇℃伅 + btnError.Text = string.Empty; + } + } + + #endregion + + #region 鈻� 閿欒淇℃伅璁剧疆_______________________ + + /// <summary> + /// 鏄剧ず閿欒鐨勪俊鎭� + /// </summary> + /// <param name="i_msg"></param> + public void SetErrorMsg(string i_msg) + { + //鑷楠岃瘉瀵嗙爜锛屾彁绀烘纭垨鑰呴敊璇� false涓烘樉绀虹孩鑹查敊璇�, 鑷閫夋嫨璋冪敤鏃舵満 + gestureControl.showCorrectStatus(false); + btnError.Text = i_msg; + } + + #endregion + + #region 鈻� 娣诲姞鍏抽棴鎸夐挳_______________________ + + /// <summary> + /// 娣诲姞鍏抽棴鎸夐挳 + /// </summary> + /// <returns></returns> + public IconViewControl AddCloseButton() + { + //鍏抽棴鎸夐挳 + var btnClose = new IconViewControl(86); + btnClose.X = this.Width - btnClose.IconSize - Application.GetRealHeight(46); + btnClose.UnSelectedImagePath = "Item/CancelIcon.png"; + this.AddChidren(btnClose); + + return btnClose; + } + + #endregion + + #region 鈻� 鎺т欢鎽ф瘉___________________________ + + /// <summary> + /// 鎺т欢鎽ф瘉 + /// </summary> + public override void RemoveFromParent() + { + FinishInputEvent = null; + base.RemoveFromParent(); + } + + #endregion + } +} -- Gitblit v1.8.0