| | |
| | | TextAlignment = TextAlignment.Center, |
| | | UnSelectedImagePath = "FunctionIcon/DoorLock/Cell.png", |
| | | }; |
| | | cellFrame.AddChidren(btnCell); |
| | | cellFrame.AddChidren(btnCell); |
| | | |
| | | |
| | | //门锁状态 |
| | | btnDoorLockIcon = new Button |
| | | #if __IOS__ |
| | | //btnCell.Padding = new Padding(0,0,0,0); |
| | | btnCell.Width += 5; |
| | | cellFrame.Width += 5; |
| | | #else |
| | | #endif |
| | | |
| | | |
| | | //门锁状态 |
| | | btnDoorLockIcon = new Button |
| | | { |
| | | X = Application.GetRealWidth(65), |
| | | Y = Application.GetRealHeight(108), |
| | |
| | | //实时视频 |
| | | this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => |
| | | { |
| | | CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk,false); |
| | | CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk, false); |
| | | }); |
| | | //临时密码 |
| | | this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 重新计算宽度(设备名称,房间控件) |
| | |
| | | private void CalculatedPosition() |
| | | { |
| | | this.btnCurrDeviceName.Width = this.btnCurrDeviceName.GetTextWidth(); |
| | | this.btnCurrDeviceName.Width += 10; |
| | | if (this.btnCurrDeviceName.GetTextWidth() > this.btnCollectIcon.X) |
| | | { |
| | | //重新计算宽度 |
| | | this.btnCurrDeviceName.Width = this.btnCollectIcon.X + Application.GetRealWidth(-10); |
| | | } |
| | | this.btnCurrDeviceRoom.Width = this.btnCurrDeviceRoom.GetTextWidth(); |
| | | this.btnCurrDeviceRoom.Width += 10; |
| | | if (this.btnCurrDeviceRoom.GetTextWidth() > this.btnCollectIcon.X) |
| | | { |
| | | //重新计算宽度 |
| | |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | if (this.btnDoorLockIcon != null && !this.btnDoorLockIcon.IsSelected) |
| | | if (pushMessageType == PushMessageType.Alarm) |
| | | { |
| | | this.btnDoorLockIcon.IsSelected = false; |
| | | //门锁电池值 |
| | | if (this.btnCell != null) |
| | | { |
| | | //videoDoorLockPage.btnCell.Text = ""; |
| | | } |
| | | } |
| | | //门锁电池值 |
| | | if (this.btnCell != null) |
| | | else |
| | | { |
| | | //videoDoorLockPage.btnCell.Text = ""; |
| | | if (this.btnDoorLockIcon != null && !this.btnDoorLockIcon.IsSelected) |
| | | { |
| | | this.btnDoorLockIcon.IsSelected = false; |
| | | } |
| | | } |
| | | |
| | | }); |
| | | |
| | | } |