| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Shared.Common; |
| | | using ZigBee.Device; |
| | | |
| | |
| | | { |
| | | Width = Application.GetRealWidth(58), |
| | | Height = Application.GetRealHeight(58), |
| | | X = Application.GetRealWidth(46) |
| | | }; |
| | | btnNextFrameLayout.AddChidren(btnNext); |
| | | |
| | | var btnLine = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(965), |
| | | Height = Application.GetRealHeight(5), |
| | | Height = Application.GetRealHeight(2), |
| | | X = Application.GetRealWidth(58), |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine, |
| | | Visible = false, |
| | |
| | | |
| | | if (i == 0) |
| | | { |
| | | bottomRowLayout.Y = Application.GetRealHeight(204); |
| | | bottomRowLayout.Y = Application.GetRealHeight(220); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.DeviceRemarkXm) + ":"; |
| | | btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58); |
| | | btnNextFrameLayout.X = btnName.Right; |
| | | btnNextFrameLayout.X = Application.GetRealWidth(233); |
| | | btnNext.TextAlignment = TextAlignment.CenterLeft; |
| | | btnNext.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | btnNext.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3; |
| | | btnNext.Text = doorLock.DeviceName; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(308); |
| | | btnLine.Y = Application.GetRealHeight(303); |
| | | } |
| | | else if (i == 1) |
| | | { |
| | | bottomRowLayout.Y = Application.GetRealHeight(343); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.BelongZone) + ":"; |
| | | var btnArea = new Button() |
| | | bottomRowLayout.Y = Application.GetRealHeight(312); |
| | | bottomRowLayout.Height = Application.GetRealHeight(127); |
| | | btnName.Width = Application.GetRealWidth(0); |
| | | btnNextFrameLayout.Width = Application.GetRealWidth(0); |
| | | //所属区域 |
| | | var rowBeloneArea = new BelongAreaControl(0); |
| | | bottomRowLayout.AddChidren(rowBeloneArea); |
| | | |
| | | rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uBelongArea), doorLock); |
| | | //底线 |
| | | rowBeloneArea.AddBottomLine(); |
| | | rowBeloneArea.SelectRoomEvent += (roomKeys) => |
| | | { |
| | | Width = Application.GetRealWidth(789 - 109 - 58), |
| | | Height = Application.GetRealHeight(58), |
| | | X = btnName.Right, |
| | | Y = btnName.Y, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | Text = "一楼,客厅", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | //变更房间 |
| | | Common.Room.CurrentRoom.ChangedRoom(doorLock, roomKeys); |
| | | }; |
| | | bottomRowLayout.AddChidren(btnArea); |
| | | btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(446); |
| | | btnLine.Visible = false; |
| | | } |
| | | else if (i == 2) |
| | | { |
| | | bottomRowLayout.Y = Application.GetRealHeight(481); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.BelongModel) + ":"; |
| | | btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58); |
| | | btnNextFrameLayout.X = btnName.Right; |
| | | btnNextFrameLayout.X = Application.GetRealWidth(233); |
| | | |
| | | btnNext.TextAlignment = TextAlignment.CenterLeft; |
| | | btnNext.Height = Application.GetRealHeight(58); |
| | | btnNext.Text = "HDL-Doorlock"; |
| | | btnNext.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | btnNext.Text = doorLock.DeviceName; |
| | | btnNext.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3; |
| | | |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(1025 - 449); |
| | | btnLine.Y = Application.GetRealHeight(575); |
| | | } |
| | | else if (i == 3) |
| | | { |
| | |
| | | btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; |
| | | |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(619 + 58 + 35); |
| | | btnLine.Y = Application.GetRealHeight(714); |
| | | } |
| | | else if (i == 4) |
| | | { |
| | | bottomRowLayout.Y = Application.GetRealHeight(723 + 35); |
| | | btnNext.X = Application.GetRealWidth(0); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.RemotelyUnlock); |
| | | btnNext.Width = Application.GetRealWidth(104); |
| | | btnNext.Height = Application.GetRealHeight(63); |
| | | btnNext.UnSelectedImagePath = "DoorLock/Switch.png"; |
| | | btnNext.SelectedImagePath = "DoorLock/SwitchOn.png"; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(723 + 127); |
| | | btnLine.Y = Application.GetRealHeight(853); |
| | | if (ZigBee.Device.DoorLock.RemoteUnlockPassword == "") |
| | | { |
| | | btnNext.IsSelected = false; |
| | |
| | | btnNextFrameLayout.Y = btnName.Y; |
| | | btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(861 + 127); |
| | | btnLine.Y = Application.GetRealHeight(992); |
| | | } |
| | | else if (i == 6) |
| | | { |
| | | bottomRowLayout.Y = Application.GetRealHeight(999 + 35); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.Shared); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.DoorLockShare); |
| | | btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(999 + 127); |
| | | btnLine.Y = Application.GetRealHeight(1131); |
| | | } |
| | | int currentIndex = i; |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | | { |
| | | if (currentIndex == 1) |
| | | { |
| | | //获取设备所属房间 |
| | | var aa = Common.Room.CurrentRoom.GetRoomByDevice(doorLock); |
| | | //获取设备所在楼层 |
| | | var bb = aa.FloorId; |
| | | //获取设备所在楼层 |
| | | var cc = aa.FloorId; |
| | | //获取楼层的名字 |
| | | var dd = Common.Config.Instance.Home.GetFloorNameById(cc); |
| | | //if (Common.Config.Instance.Home.FloorDics.Count == 0)//这个是无楼层模式 |
| | | |
| | | var listCheck = new List<string>(); |
| | | } |
| | | else if (currentIndex == 3) |
| | | { |