| | |
| | | /// <summary> |
| | | /// 表示来自那个界面 |
| | | /// </summary> |
| | | private Comerom Comerom; |
| | | private UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom Comerom; |
| | | /// <summary> |
| | | /// 删除设备后需要更新界面的回调 |
| | | /// </summary> |
| | |
| | | /// <param name="function">设备</param> |
| | | /// <param name="btnDeviceName">上一级界面的设备名字控件</param> |
| | | /// <param name="btnRoomName">上一级界面的房间名字控件</param> |
| | | public VideoDoorLockPage(Function function, Button btnDeviceName, Button btnRoomName, Comerom comerom, Action action) |
| | | public VideoDoorLockPage(Function function, Button btnDeviceName, Button btnRoomName, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom comerom, Action action) |
| | | { |
| | | this.device = function; |
| | | this.btnDeviceName = btnDeviceName; |
| | |
| | | this.topView.clickBackBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | RemoveFromParent(); |
| | | |
| | | |
| | | }; |
| | | //设置 |
| | | this.topView.clickSetBtn.MouseUpEventHandler += (sender, e) => |
| | |
| | | /// </summary> |
| | | private void ReadData() |
| | | { |
| | | Loading loading = new Loading(); |
| | | this.AddChidren(loading); |
| | | loading.Start(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.Send.Currnet.GetCellValue(this.device, (value) => |
| | | try |
| | | { |
| | | var videoDoorLockInfo = UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetVideoDoorLockState(this.device); |
| | | var cellInfo =UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetCellValue(this.device); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //this.cellDiyArcSeekBar.Progress = i; |
| | | //更新电量值 |
| | | this.btnCell.Text = value + "%"; |
| | | this.btnCell.Text = cellInfo.remain + "%"; |
| | | this.btnDoorLockIcon.IsSelected = videoDoorLockInfo.doorStatus == "open"; |
| | | }); |
| | | |
| | | }); |
| | | |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | { IsBackground = true }.Start() ; |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 自己弄一个FrameLayout |
| | |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 表示来自那个界面 |
| | | /// </summary> |
| | | public enum Comerom |
| | | { |
| | | function,//功能 |
| | | collect,//收藏 |
| | | room,//房间 |
| | | } |
| | | |
| | | |
| | | } |