| | |
| | | if (DateTime.Now < ZigBee.Device.DoorLock.minValue) |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AfterThirtySeconds), Direction = AMPopTipDirection.Down, CloseTime = 2 }.Show(editInputPassword); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AfterFiftySeconds), Direction = AMPopTipDirection.Down, CloseTime = 2 }.Show(editInputPassword); |
| | | return; |
| | | } |
| | | |
| | | if (DateTime.Now >= oldTime && ZigBee.Device.DoorLock.RemoteUnlockCount == 0) |
| | | { |
| | | ZigBee.Device.DoorLock.RemoteUnlockCount = 3; |
| | | ZigBee.Device.DoorLock.RemoteUnlockCount = 5; |
| | | oldTime = DateTime.MaxValue; |
| | | } |
| | | |
| | | if (ZigBee.Device.DoorLock.RemoteUnlockCount <= 0) |
| | | { |
| | | ZigBee.Device.DoorLock.minValue = DateTime.Now.AddSeconds(+20); |
| | | ZigBee.Device.DoorLock.minValue = DateTime.Now.AddSeconds(+15); |
| | | oldTime = ZigBee.Device.DoorLock.minValue; |
| | | CommonPage.Loading.Hide(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AfterThirtySeconds), Direction = AMPopTipDirection.Down, CloseTime = 2 }.Show(editInputPassword); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AfterFiftySeconds), Direction = AMPopTipDirection.Down, CloseTime = 2 }.Show(editInputPassword); |
| | | return; |
| | | } |
| | | |
| | |
| | | System.Threading.Thread.Sleep(500); |
| | | ZigBee.Device.DoorLock.RemoteUnlockPassword = editInputPassword.Text; |
| | | ZigBee.Device.DoorLock.minValue = DateTime.MinValue; |
| | | ZigBee.Device.DoorLock.RemoteUnlockCount = 3; |
| | | ZigBee.Device.DoorLock.RemoteUnlockCount = 5; |
| | | oldTime = DateTime.MaxValue; |
| | | CommonPage.Loading.Hide(); |
| | | dialog.Close(); |