old mode 100755
new mode 100644
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | TextID = R.MyInternationalizationString.Cancel, |
| | | TextSize = 16 |
| | | TextSize = 14 |
| | | }; |
| | | topView.AddChidren(cancle); |
| | | |
| | |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = ZigbeeColor.Current.GXCTextSelectedColor2, |
| | | TextID = R.MyInternationalizationString.Confrim, |
| | | TextSize = 16 |
| | | TextSize = 14 |
| | | }; |
| | | topView.AddChidren(confrim); |
| | | |
| | | pickView = new UIPickerView |
| | | { |
| | | Y = Application.GetRealHeight(20+138), |
| | | Y = Application.GetRealHeight(20 + 138), |
| | | Height = Application.GetRealHeight(450) |
| | | }; |
| | | backgroundFL.AddChidren(pickView); |
| | | |
| | | foreach(var floor in Config.Instance.Home.FloorDics) |
| | | foreach (var floor in Config.Instance.Home.FloorDics) |
| | | { |
| | | floorList.Add(floor.Value); |
| | | } |
| | | foreach(var room in Shared.Common.Room.Lists) |
| | | foreach (var room in Shared.Common.Room.Lists) |
| | | { |
| | | if(room.IsLove) |
| | | { |
| | | continue; |
| | | } |
| | | roomList.Add(room.Name); |
| | | roomIdList.Add(room.Id); |
| | | } |
| | | pickView.setNPicker(floorList, roomList, null); |
| | | |
| | | pickView.OnSelectChangeEvent += (l1, l2, l3) => |
| | | if (floorList.Count == 0) |
| | | { |
| | | currentId = roomIdList[l2]; |
| | | }; |
| | | pickView.setNPicker(roomList, null, null); |
| | | currentId = roomIdList[0]; |
| | | pickView.OnSelectChangeEvent += (l1, l2, l3) => |
| | | { |
| | | currentId = roomIdList[l1]; |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | pickView.setNPicker(floorList, roomList, null); |
| | | currentId = roomIdList[0]; |
| | | pickView.OnSelectChangeEvent += (l1, l2, l3) => |
| | | { |
| | | currentId = roomIdList[l2]; |
| | | }; |
| | | } |
| | | |
| | | cancle.MouseUpEventHandler += Close; |
| | | confrim.MouseUpEventHandler += Confrim_MouseEvent; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// Close |
| | |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void Confrim_MouseEvent(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | ZoneAction?.Invoke(Shared.Common.Room.CurrentRoom.GetRoomById(currentId)); |
| | | if (Shared.Common.Room.CurrentRoom.GetRoomById(currentId) != null) |
| | | { |
| | | ZoneAction?.Invoke(Shared.Common.Room.CurrentRoom.GetRoomById(currentId)); |
| | | } |
| | | RemoveFromParent(); |
| | | } |
| | | } |