| | |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.UI.Music; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | /// 区域 |
| | | /// </summary> |
| | | private Button btnCurrDeviceRoom; |
| | | /// <summary> |
| | | /// 电量父控件 |
| | | /// </summary> |
| | | private FrameLayout cellFrame; |
| | | /// <summary> |
| | | /// 电量 |
| | | /// </summary> |
| | |
| | | }; |
| | | whiteFl.AddChidren(btnCurrDeviceName); |
| | | |
| | | btnCurrDeviceName.Width = btnCurrDeviceName.GetTextWidth(); |
| | | if (btnCurrDeviceName.GetTextWidth() > btnCollectIcon.X) |
| | | { |
| | | btnCurrDeviceName.Width = btnCollectIcon.X; |
| | | } |
| | | |
| | | btnCurrDeviceRoom = new Button |
| | | { |
| | | TextSize = TextSize.Text12, |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | whiteFl.AddChidren(btnCurrDeviceRoom); |
| | | btnCurrDeviceRoom.Width = btnCurrDeviceRoom.GetTextWidth(); |
| | | |
| | | var cellFrame = new FrameLayout |
| | | cellFrame = new FrameLayout |
| | | { |
| | | X = btnCurrDeviceRoom.Right + Application.GetRealWidth(20), |
| | | Y = btnCurrDeviceName.Bottom + Application.GetRealHeight(5), |
| | |
| | | Height = Application.GetRealHeight(16), |
| | | }; |
| | | whiteFl.AddChidren(cellFrame); |
| | | |
| | | |
| | | |
| | | cellDiyArcSeekBar = new DiyArcSeekBar |
| | | { |
| | |
| | | cellFrame.AddChidren(btnCell); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //门锁状态 |
| | | btnDoorLockIcon = new Button |
| | | { |
| | |
| | | SelectedImagePath = "FunctionIcon/DoorLock/UnLocking.png", |
| | | }; |
| | | whiteFl.AddChidren(btnDoorLockIcon); |
| | | |
| | | this.CalculatedPosition();//重新计算宽度 |
| | | |
| | | int heightY = btnDoorLockIcon.Bottom + Application.GetRealHeight(70); |
| | | //实时视频 |
| | | rtvFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); |
| | |
| | | pswFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png"; |
| | | pswFL.GetTextButton().TextID = StringId.linshimima1; |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | { |
| | | RemoveFromParent(); |
| | | |
| | | |
| | | |
| | | }; |
| | | //设置 |
| | | this.topView.clickSetBtn.MouseUpEventHandler += (sender, e) => |
| | |
| | | ////刷新显示 |
| | | this.btnDeviceName.Text = this.device.name; |
| | | this.btnRoomName.Text = this.device.GetRoomListName(); |
| | | this.topView.topNameBtn.Text = this.device.name; |
| | | this.btnCurrDeviceName.Text = this.device.name; |
| | | this.btnCurrDeviceRoom.Text = this.device.GetRoomListName(); |
| | | this.CalculatedPosition();//重新计算宽度 |
| | | |
| | | ////从新计算宽度 |
| | | //this.btnDeviceName.Text = btnDeviceName.Text; |
| | | //this.btnDeviceName.Width = this.btnDeviceName.GetTextWidth(); |
| | | |
| | | //this.btnRoomName.Text = btnRoomName.Text; |
| | | //this.btnRoomName.Width = this.btnRoomName.GetTextWidth(); |
| | | |
| | | ////回调事件 |
| | | //this.SettionFinishEvent?.Invoke(); |
| | | }, () => |
| | | { |
| | | //解绑设备后 |
| | |
| | | //实时视频 |
| | | this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => |
| | | { |
| | | |
| | | CommonMethod.Current.SkipRTVActivity(this.device.sid,this.device.deviceId,this.device.spk); |
| | | }); |
| | | //临时密码 |
| | | this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => { }); |
| | | this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => { |
| | | CommonMethod.Current.SkipPSWActivity(); |
| | | }); |
| | | //历史记录 |
| | | this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => { }); |
| | | this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => { |
| | | CommonMethod.Current.SkipRecordActivity(); |
| | | }); |
| | | |
| | | |
| | | } |
| | |
| | | try |
| | | { |
| | | var videoDoorLockInfo = UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetVideoDoorLockState(this.device); |
| | | var cellInfo =UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetCellValue(this.device); |
| | | var cellInfo = UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetCellValue(this.device); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //this.cellDiyArcSeekBar.Progress = i; |
| | |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start() ; |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 重新计算宽度(设备名称,房间控件) |
| | | /// </summary> |
| | | private void CalculatedPosition() |
| | | { |
| | | this.btnCurrDeviceName.Width = this.btnCurrDeviceName.GetTextWidth(); |
| | | if (this.btnCurrDeviceName.GetTextWidth() > this.btnCollectIcon.X) |
| | | { |
| | | //重新计算宽度 |
| | | this.btnCurrDeviceName.Width = this.btnCollectIcon.X + Application.GetRealWidth(-10); |
| | | } |
| | | this.btnCurrDeviceRoom.Width = this.btnCurrDeviceRoom.GetTextWidth(); |
| | | if (this.btnCurrDeviceRoom.GetTextWidth() > this.btnCollectIcon.X) |
| | | { |
| | | //重新计算宽度 |
| | | this.btnCurrDeviceRoom.Width = this.btnCollectIcon.X + Application.GetRealWidth(-20 - 10); |
| | | } |
| | | this.cellFrame.X = this.btnCurrDeviceRoom.Right + Application.GetRealWidth(20); |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 自己弄一个FrameLayout |
| | |
| | | TextID = StringId.dangqianmenweiguan, |
| | | TextSize = TextSize.Text12, |
| | | TextColor = MusicColor.TextCancelColor, |
| | | TextAlignment=TextAlignment.Center, |
| | | TextAlignment = TextAlignment.Center, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Name = "btnStateText" |
| | | }; |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |