From b9cb076fe6127160c96c35bf9c8cebcffe1d5ccd Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 10 一月 2020 17:35:23 +0800 Subject: [PATCH] 2020.1.10 --- ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs index efe2704..64eedf0 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs @@ -31,6 +31,10 @@ /// </summary> private Button floorBtn; /// <summary> + /// 褰撳墠妤煎眰id + /// </summary> + private string curFloorId; + /// <summary> /// 閫夋嫨妤煎眰 /// </summary> private Button selectFloorBtn; @@ -148,12 +152,12 @@ typeIdDic.Clear(); foreach (var device in devList) { - var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice }); + var info = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device.CommonDevice); if (info.BeloneType == DeviceBeloneType.A寮�鍏� || info.BeloneType == DeviceBeloneType.A褰╃伅 || info.BeloneType == DeviceBeloneType.A鎻掑骇 || info.BeloneType == DeviceBeloneType.A鏅鸿兘绌哄紑 || info.BeloneType == DeviceBeloneType.A鐏厜 || info.BeloneType == DeviceBeloneType.A绌鸿皟 || info.BeloneType == DeviceBeloneType.A绐楀笜 || info.BeloneType == DeviceBeloneType.A缁х數鍣� - || info.BeloneType == DeviceBeloneType.A璋冨厜鍣� + || info.BeloneType == DeviceBeloneType.A璋冨厜鍣� ) { if (typeDeviceDic.ContainsKey(info.BeloneTextId) == false) @@ -226,9 +230,12 @@ { var floors = new SelectFloor(); AddChidren(floors); + floors.changeFloor = false; + floors.CurFloorId = curFloorId; floors.Init(580, 184, Direction.Right); floors.FloorAction += (floorId) => { + curFloorId = floorId; floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId); RefreshBodyView(floorId); }; @@ -396,7 +403,7 @@ }; string imgPath = string.Empty; string imgSeletedPath = string.Empty; - Common.LocalDevice.Current.GetDeviceBeloneIcon(deviceType.Value, ref imgPath, ref imgSeletedPath); + Common.LocalDevice.Current.GetDeviceObjectIcon(deviceType.Value, ref imgPath, ref imgSeletedPath); functionTypeIMG.Init(imgPath, imgSeletedPath); functionTypeIMG.SetTitle(deviceType.Key); typeRowLayout.AddChidren(functionTypeIMG); @@ -426,7 +433,7 @@ var sameTypeList = new List<DeviceUI> { }; sameTypeList = typeDeviceDic[int.Parse((typeSender as Button).Tag.ToString())]; - + foreach (var device in sameTypeList) { if (beforeSceneTargetDeviceUIs.Find((obj) => obj.DeviceUI.DeviceEpoint == device.DeviceEpoint && obj.DeviceUI.DeviceAddr == device.DeviceAddr) != null) @@ -441,11 +448,13 @@ deviceListScrolView.AddChidren(deviceTypeRowLayout); var deviceRow = new FunctionRow(0, 35); - deviceTypeRowLayout.AddChidren(deviceRow); deviceRow.Init(device.IconPath, device.OnlineIconPath, true); deviceRow.SetTitle(device.CommonDevice.DeviceEpointName); deviceRow.IsSelected = true; deviceRow.HideSwitchBtn(false); + deviceRow.NameBtn.BackgroundColor = ZigbeeColor.Current.GXCRedColor; + deviceTypeRowLayout.AddChidren(deviceRow); + deviceRow.ClickBtn.MouseUpEventHandler += (sender, e) => { @@ -787,7 +796,7 @@ dialog.RemoveFromParent(); }; - open.SeekBar.ProgressChanged += (sender, e) => + open.SeekBar.OnProgressChangedEvent += (sender, e) => { open.IsSelected = true; shut.IsSelected = false; @@ -805,7 +814,7 @@ { open.IsSelected = true; shut.IsSelected = false; - open.SetProgress(sceneTarget.TaskList[0].Data2); + open.SetSeekBarProgress(sceneTarget.TaskList[0].Data2); } } @@ -953,7 +962,7 @@ dialog.RemoveFromParent(); }; - open.SeekBar.ProgressChanged += (sender, e) => + open.SeekBar.OnProgressChangedEvent += (sender, e) => { open.IsSelected = true; shut.IsSelected = false; @@ -971,7 +980,7 @@ { open.IsSelected = true; shut.IsSelected = false; - open.SetProgress(sceneTarget.TaskList[0].Data1); + open.SetSeekBarProgress(sceneTarget.TaskList[0].Data1); } } -- Gitblit v1.8.0