| | |
| | | btnFuncSet = new Button |
| | | { |
| | | X = Application.GetRealWidth(103), |
| | | Height = Application.GetRealHeight(69), |
| | | Width = Application.GetRealWidth(69), |
| | | Height = Application.GetMinReal(69), |
| | | Width = Application.GetMinReal(69), |
| | | UnSelectedImagePath = "DoorLock/SettingIcon.png", |
| | | }; |
| | | btnFuncSetFrameLayout.AddChidren(btnFuncSet); |
| | |
| | | midTopFrameLayout.AddChidren(btnRecordFrameLayout); |
| | | btnRecord = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(69), |
| | | Height = Application.GetRealHeight(69), |
| | | Width = Application.GetMinReal(69), |
| | | Height = Application.GetMinReal(69), |
| | | X = Application.GetRealWidth(46), |
| | | Y = Application.GetRealHeight(46), |
| | | UnSelectedImagePath = "DoorLock/RecordIcon.png", |
| | |
| | | midTopFrameLayout.AddChidren(btnCollectFrameLayout); |
| | | btnCollect = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(69), |
| | | Height = Application.GetRealHeight(69), |
| | | Width = Application.GetMinReal(69), |
| | | Height = Application.GetMinReal(69), |
| | | X = Application.GetRealWidth(15), |
| | | Y = Application.GetRealHeight(46), |
| | | UnSelectedImagePath = "Item/Collection.png", |
| | |
| | | //门锁开/关图片 |
| | | btnDoorLockPic = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(383), |
| | | Height = Application.GetRealHeight(343), |
| | | Width = Application.GetMinReal(383), |
| | | Height = Application.GetMinReal(343), |
| | | X = Application.GetRealWidth(161), |
| | | Y = Application.GetRealHeight(415), |
| | | UnSelectedImagePath = "DoorLock/DoorLockPicClose.png", |
| | |
| | | |
| | | progressButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(84),//639-35 |
| | | Height = Application.GetRealHeight(93), |
| | | Width = Application.GetMinReal(84),//639-35 |
| | | Height = Application.GetMinReal(93), |
| | | X = Application.GetRealWidth(58), |
| | | Y = Application.GetRealHeight(347), |
| | | UnSelectedImagePath = "DoorLock/UnLockButton.png", |
| | |
| | | |
| | | btnDoorOpenPic = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(81), |
| | | Height = Application.GetRealHeight(81), |
| | | Width = Application.GetMinReal(81), |
| | | Height = Application.GetMinReal(81), |
| | | X = Application.GetRealWidth(164), |
| | | Y = Application.GetRealHeight(6), |
| | | UnSelectedImagePath = "DoorLock/DoorLockOpen.png", |
| | |
| | | |
| | | btnDoorClosePic = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(81), |
| | | Height = Application.GetRealHeight(81), |
| | | Width = Application.GetMinReal(81), |
| | | Height = Application.GetMinReal(81), |
| | | X = Application.GetRealWidth(164), |
| | | Y = Application.GetRealHeight(117), |
| | | UnSelectedImagePath = "DoorLock/DoorLockClose.png", |
| | |
| | | //电量 |
| | | btnPower = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(81), |
| | | Height = Application.GetRealHeight(81), |
| | | Width = Application.GetMinReal(81), |
| | | Height = Application.GetMinReal(81), |
| | | X = Application.GetRealWidth(253), |
| | | Y = Application.GetRealHeight(994), |
| | | UnSelectedImagePath = "DoorLock/PowerOffline.png", |
| | |
| | | midTopFrameLayout.AddChidren(btnVolumeFrameLayout); |
| | | btnVolume = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(81), |
| | | Height = Application.GetRealHeight(81), |
| | | Width = Application.GetMinReal(81), |
| | | Height = Application.GetMinReal(81), |
| | | X = Application.GetRealWidth(40), |
| | | Y = Application.GetRealHeight(40), |
| | | UnSelectedImagePath = "DoorLock/VolumeIcon.png", |
| | |
| | | midTopFrameLayout.AddChidren(btnNormallyOpenFrameLayout); |
| | | btnNormallyOpen = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(81), |
| | | Height = Application.GetRealHeight(81), |
| | | Width = Application.GetMinReal(81), |
| | | Height = Application.GetMinReal(81), |
| | | X = Application.GetRealWidth(40), |
| | | Y = Application.GetRealHeight(40), |
| | | UnSelectedImagePath = "DoorLock/NormallyOpen.png", |
| | |
| | | #region 当前房间 |
| | | var btnCurrentRoomPic = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(81), |
| | | Height = Application.GetRealHeight(81), |
| | | Width = Application.GetMinReal(81), |
| | | Height = Application.GetMinReal(81), |
| | | X = Application.GetRealWidth(58), |
| | | Y = Application.GetRealHeight(29), |
| | | UnSelectedImagePath = "DoorLock/RoomPic.png", |
| | |
| | | //设置 |
| | | EventHandler<MouseEventArgs> btnFuncSetHander = (sender, e) => |
| | | { |
| | | var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock); |
| | | //打开其他界面时前移除 |
| | | RemoveFromParent(); |
| | | var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(currentRoom, doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | functionSetting.Show(); |
| | | |
| | | functionSetting.devicNameAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | |
| | | EventHandler<MouseEventArgs> handerNormallyOpen = (sender, e) => |
| | | { |
| | | NomallyOpenDialog(); |
| | | |
| | | }; |
| | | btnNormallyOpenFrameLayout.MouseUpEventHandler += handerNormallyOpen; |
| | | btnNormallyOpen.MouseUpEventHandler += handerNormallyOpen; |
| | |
| | | { |
| | | btnPower.UnSelectedImagePath = "DoorLock/Power40.png"; |
| | | } |
| | | else if (currentPower <= 60 && currentPower > 40 || currentPower == 60) |
| | | else if (currentPower <= 60 && currentPower > 40) |
| | | { |
| | | btnPower.UnSelectedImagePath = "DoorLock/Power60.png"; |
| | | } |
| | | else if (currentPower <= 80 && currentPower >= 60) |
| | | else if (currentPower <= 80 && currentPower > 60) |
| | | { |
| | | btnPower.UnSelectedImagePath = "DoorLock/Power80.png"; |
| | | } |
| | | else if (currentPower <= 100 && currentPower >= 80) |
| | | else if (currentPower <= 100 && currentPower > 80) |
| | | { |
| | | btnPower.UnSelectedImagePath = "DoorLock/Power100.png"; |
| | | } |
| | |
| | | { |
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1) |
| | | { |
| | | this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.NoAccess)); |
| | | this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate)); |
| | | return; |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | //添加App开启常开模式的历史记录 |
| | | HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(this.doorLock, 9001, string.Empty); |
| | | |
| | | //每次重新设置常开,默认时间都是12小时 |
| | | DoorLockCommonInfo.NormallyOpenModeInvalidTime = 12; |
| | | NormallyOpenModeValue(true); |
| | |
| | | { |
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1) |
| | | { |
| | | this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate)); |
| | | return; |
| | | } |
| | | string msg = Language.StringByID(R.MyInternationalizationString.NomallyModeIsCanceled).Replace("{0}", "\r\n"); |
| | |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | {
|
| | | //添加App开启常开模式的历史记录
|
| | | HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(this.doorLock, 9002, string.Empty); |
| | | |
| | | NormallyOpenModeValue(false); |
| | | UpdateNomallyOpenStatus(); |
| | | string msg2 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess); |
| | |
| | | var result1 = await DoorLockCommonInfo.GetDoorLockUnlockAccess(doorLock, Shared.Common.Config.Instance.Guid); |
| | | if (result1 == true) |
| | | { |
| | | RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle); |
| | | RemoteUnlockRequest(currentRoom, deviceUI, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle); |
| | | devicNameSecAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | |
| | | } |
| | | else |
| | | { |
| | | RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle); |
| | | RemoteUnlockRequest(currentRoom, deviceUI, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle); |
| | | devicNameSecAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |