| | |
| | | ((ViewGroup)nowForm).AddChidren(MsgControlFrameLayout);
|
| | | MsgControlFrameLayout.MouseDownEventHandler += (sender, e) =>
|
| | | {
|
| | | if (msgType == DoorLockMsgType.InValid)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | //移除界面
|
| | | MsgControlFrameLayout.RemoveFromParent();
|
| | | //回调函数
|
| | |
| | | btnMsg.Text = msgText;
|
| | | }
|
| | |
|
| | | if (msgType == DoorLockMsgType.Confirm || msgType == DoorLockMsgType.InValid || msgType == DoorLockMsgType.NomallyOpenMode || msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
|
| | | if (msgType == DoorLockMsgType.Confirm || msgType == DoorLockMsgType.NomallyOpenMode || msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
|
| | | {
|
| | | //初始化确认类型的底部按钮
|
| | | this.InitBottomConfirmButton(MsgControlFrameLayout, frameBack);
|
| | | }
|
| | | else if (msgType == DoorLockMsgType.InValid)
|
| | | {
|
| | | //失效设置的底部按钮
|
| | | this.InitBottomInvalidTimeButton(MsgControlFrameLayout, frameBack);
|
| | | }
|
| | | else if (msgType == DoorLockMsgType.DoorLockLogic)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 失效时间的底部按钮
|
| | | /// </summary>
|
| | | /// <param name="frameMain"></param>
|
| | | /// <param name="frameBack"></param>
|
| | | private void InitBottomInvalidTimeButton(FrameLayout frameMain, FrameLayout frameBack)
|
| | | {
|
| | | //确定按钮
|
| | | var btnConfirm = new BottomRightClickButton(frameBack.Width, Application.GetRealHeight(127));
|
| | | frameBack.AddChidren(btnConfirm);
|
| | | btnConfirm.InitControl(buttonOkText);
|
| | | btnConfirm.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | string textValue = string.Empty;
|
| | | if (editInvalidTime != null)
|
| | | {
|
| | | textValue = editInvalidTime.Text.Trim();
|
| | | if (this.CheckInvalidTime(textValue.TrimStart('0')) == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | | //移除界面
|
| | | frameMain.RemoveFromParent();
|
| | | if (msgType == DoorLockMsgType.InValid)
|
| | | {
|
| | | if (InvalidTimeAction != null)
|
| | | {
|
| | | InvalidTimeAction(textValue);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | //回调函数
|
| | | this.ConfirmClickEvent?.Invoke();
|
| | | this.ConfirmClickEvent = null;
|
| | | }
|
| | | };
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化确认类型的底部按钮
|
| | | /// </summary>
|
| | | /// <param name="frameMain"></param>
|