| | |
| | | /// <param name="common">Common.</param> |
| | | public void Changed(CommonDevice common) |
| | | { |
| | | //if (common.Type != ZigBee.Device.DeviceType.OnOffSwitch) |
| | | //{ |
| | | // return; |
| | | //} |
| | | |
| | | Shared.Application.RunOnMainThread(() => |
| | | { |
| | | //var dev = common as Panel; |
| | | }); |
| | | } |
| | | |
| | |
| | | { |
| | | Width = Application.GetRealWidth(907), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Radius = (uint)Application.GetRealHeight(120) / 2, |
| | | Radius = (uint)Application.GetRealHeight(127) / 2, |
| | | TextID = R.MyInternationalizationString.ChooseKeyMode, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | |
| | | roomList.Add(room); |
| | | } |
| | | } |
| | | //当前按键所有显示房间的所有设备处理 |
| | | var aa = GetALlDispalyRoomDeviceList(); |
| | | //首次拿到所有房间中按键的目标并存储 |
| | | //if (IsInitEntry) |
| | | //{ |
| | | //首次拿到所有房间中按键的目标并存储 |
| | | GetALlDispalyRoomDeviceList(); |
| | | if (currentKeyAllRoomDeviceList.Count != 0) |
| | | { |
| | | if (currentKey.bindList != null && currentKey.bindList.Count != 0) |
| | |
| | | } |
| | | } |
| | | } |
| | | if (oldTargetList != null) |
| | | if (oldTargetList.Count != 0) |
| | | { |
| | | foreach (var de in oldTargetList.Keys) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | //} |
| | | if (roomList.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | | Shared.Common.Room curRoom = roomList[0]; |
| | | int index = 0; |
| | | RefreshRoomList(curRoom, btnChooseKeyMode, ref index); |
| | |
| | | int curIndex = 0; |
| | | foreach (var device in curTypeDeviceList) |
| | | { |
| | | if (device.CommonDevice != null && device.CommonDevice.IsOnline == 0) |
| | | { |
| | | continue; |
| | | } |
| | | #region 绑定表UI显(无数据处理) |
| | | var rowLayout = new FrameLayout() |
| | | { |
| | |
| | | }; |
| | | rowLayout.AddChidren(line2); |
| | | |
| | | if (curIndex == curRoom.SceneUIList.Count - 1) |
| | | if (curIndex == curRoom.DeviceUIList.Count - 1) |
| | | { |
| | | line2.Visible = false; |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | targetList.Add(device.CommonDevice); |
| | | btnChoose.IsSelected = true; |
| | | btnChoose.Visible = true; |
| | | if (targetList.Count > 9) |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFull), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | } |
| | | else |
| | | { |
| | | targetList.Add(device.CommonDevice); |
| | | btnChoose.IsSelected = true; |
| | | btnChoose.Visible = true; |
| | | } |
| | | } |
| | | }; |
| | | rowLayout.MouseUpEventHandler += hander; |