| | |
| | | { |
| | | public class UserDoorLockPage : DoorLockCommonLayout, ZigBee.Common.IStatus |
| | | { |
| | | public UserDoorLockPage(ZigBee.Device.DoorLock doorLock, Shared.Phone.UserCenter.MemberInfoRes accountObj) |
| | | |
| | | public UserDoorLockPage(Shared.Common.Room room ,DeviceUI doorLock) |
| | | { |
| | | this.doorLock = doorLock; |
| | | //currentRoom = room;Shared.Common.Room room, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor; |
| | | this.doorLock = doorLock.CommonDevice as ZigBee.Device.DoorLock; |
| | | currentRoom = room; |
| | | deviceUI = doorLock; |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor; |
| | | ZigBee.Device.ZbGateway.StatusList.Add(this); |
| | | } |
| | | |
| | |
| | | ZigBee.Device.DoorLock doorLock; |
| | | FrameLayout bottomFrameLayout; |
| | | Shared.Common.Room currentRoom; |
| | | DeviceUI deviceUI; |
| | | Action action; |
| | | #endregion |
| | | |
| | |
| | | }; |
| | | this.titleFrameLayout.AddChidren(btnShare); |
| | | |
| | | var btnFuncSetFrameLayout = new FrameLayout |
| | | { |
| | | X = Application.GetRealWidth(850 - 116), |
| | | Height = Application.GetRealHeight(69), |
| | | Width = Application.GetRealWidth(69 * 2 + 58), |
| | | }; |
| | | this.titleFrameLayout.AddChidren(btnFuncSetFrameLayout); |
| | | |
| | | var btnFuncSet = new Button |
| | | { |
| | | X = Application.GetRealWidth(953 - 116), |
| | | X = Application.GetRealWidth(103), |
| | | Height = Application.GetRealHeight(69), |
| | | Width = Application.GetRealWidth(69), |
| | | UnSelectedImagePath = "DoorLock/SettingIcon.png", |
| | | }; |
| | | this.titleFrameLayout.AddChidren(btnFuncSet); |
| | | btnFuncSetFrameLayout.AddChidren(btnFuncSet); |
| | | btnFuncSet.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1) |
| | |
| | | midTopFrameLayout.AddChidren(btnRecord); |
| | | btnRecord.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | var doorLock = new ZigBee.Device.DoorLock(); |
| | | var doorLockRecord = new Shared.Phone.UserCenter.DoorLock.HistoryRecordPage(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(doorLockRecord); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | doorLockRecord.Show(); |
| | | //历史记录 ---- stan |
| | | var form = new DeviceDoorLock.DoorLockHistoryLogForm(); |
| | | form.AddForm(this.doorLock.DeviceAddr); |
| | | }; |
| | | |
| | | var btnCollect = new Button() |
| | |
| | | btnCollect.IsSelected = !btnCollect.IsSelected; |
| | | if (btnCollect.IsSelected) |
| | | { |
| | | // Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteDevice(doorLock.FileName); //取消收藏 |
| | | Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteDevice(deviceUI.FileName); //取消收藏 |
| | | } |
| | | else |
| | | { |
| | | //Shared.Common.Room.CurrentRoom.GetLoveRoom().AddDevice(doorLock.FileName);//收藏 |
| | | Shared.Common.Room.CurrentRoom.GetLoveRoom().AddDevice(deviceUI.FileName);//收藏 |
| | | } |
| | | }; |
| | | |
| | |
| | | |
| | | var btnFrameLayout = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(420 - 46),//639-35 |
| | | Width = Application.GetRealWidth(420 - 46), |
| | | Height = Application.GetRealHeight(446), |
| | | X = btnDoorLockPic.Right, |
| | | Y = Application.GetRealHeight(354), |
| | |
| | | Height = Application.GetRealHeight(49), |
| | | X = Application.GetRealWidth(150), |
| | | Y = Application.GetRealHeight(46), |
| | | // Text = currentRoom.Name, |
| | | Text = currentRoom.Name, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | TextSize = 12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | } |
| | | else |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | } |
| | | } |
| | | else |