From aed247d7fa4499665041864479fae82089eafe5f Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期二, 07 一月 2020 09:15:57 +0800 Subject: [PATCH] 2019.1.7 --- ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs | 58 ++++++++++------------------------------------------------ 1 files changed, 10 insertions(+), 48 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs index 9581fee..16caf21 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs @@ -48,6 +48,7 @@ /// </summary> public override void RemoveFromParent() { + EditAction = null; base.RemoveFromParent(); } #endregion @@ -166,7 +167,7 @@ }; bodyFrameLayout.AddChidren(infoFL); var rectCornerID = HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight; - infoFL.SetCornerWithSameRadius(Application.GetRealHeight(50), rectCornerID); + infoFL.SetCornerWithSameRadius(Application.GetRealHeight(58), rectCornerID); var tipBtn = new Button { @@ -292,59 +293,20 @@ //infoFL.AddChidren(sharedRow); } - var confirmBtn = new CommonForm.CompleteButton(962, 907, 127); - confirmBtn.SetTitle(R.MyInternationalizationString.Confrim); + var confirmBtn = new CommonForm.CompleteButton(962, 900, 127); + confirmBtn.SetTitle(R.MyInternationalizationString.Save); infoFL.AddChidren(confirmBtn); #region event EventHandler<MouseEventArgs> selectZoneEvent = (sender, e) => { - List<string> floorIds = new List<string> { }; - List<string> floorNames = new List<string> { }; - List<List<string>> roomNames = new List<List<string>> { }; - List<List<Common.Room>> rooms = new List<List<Common.Room>> { }; - List<Common.Room> rs = new List<Common.Room> { }; - List<string> rNames = new List<string> { }; - if (Config.Instance.Home.FloorDics.Count>0) + var zone = new SelectZone(); + zone.Init(); + zone.ZoneAction += (selectRoom) => { - foreach (var floor in Config.Instance.Home.FloorDics) - { - floorIds.Add(floor.Key); - floorNames.Add(floor.Value); - if (Common.Room.CurrentRoom.GetRoomsByFloorId(floor.Key).Count > 0) - { - roomNames.Add(Common.Room.CurrentRoom.GetRoomNamesByFloorId(floor.Key)); - rooms.Add(Common.Room.CurrentRoom.GetRoomsByFloorId(floor.Key)); - } - } - PickerView.ShowSecondary(floorNames, roomNames, (index1, index2) => - { - curRoom = rooms[index1][index2]; - zoneRow.SetTitle($"{Config.Instance.Home.GetFloorNameById(floorIds[index1])} , {rooms[index1][index2].Name}"); - }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongZone), - Language.StringByID(R.MyInternationalizationString.Confrim), - Language.StringByID(R.MyInternationalizationString.Cancel)); - } - else - { - for(int i=0;i<Common.Room.Lists.Count;i++) - { - var r = Common.Room.Lists[i]; - if (r.IsLove) - { - continue; - } - rs.Add(r); - rNames.Add(r.Name); - } - PickerView.Show(rNames, (index1) => - { - curRoom = rs[index1]; - zoneRow.SetTitle(rs[index1].Name); - }, 0,Language.StringByID(R.MyInternationalizationString.BelongZone), - Language.StringByID(R.MyInternationalizationString.Confrim), - Language.StringByID(R.MyInternationalizationString.Cancel)); - } + curRoom = selectRoom; + zoneRow.SetTitle(selectRoom.GetZoneName()); + }; }; zoneRow.ClickBtn.MouseUpEventHandler += selectZoneEvent; -- Gitblit v1.8.0