| | |
| | | /// <summary> |
| | | /// 添加目标后的展示列表 |
| | | /// </summary> |
| | | public VerticalScrolViewLayout TargetListScrolView; |
| | | public FrameLayout TargetListScrolView; |
| | | /// <summary> |
| | | /// The confirm button. |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// selectedTimeAction |
| | | /// </summary> |
| | | public Action<SceneTargetDeviceUI> selectedAction; |
| | | |
| | | |
| | | private Action<SceneTargetDeviceUI> selectedAction; |
| | | /// <summary> |
| | | /// 修改场景action |
| | | /// </summary> |
| | | public Action<SceneUI, Common.Room> EditorAction; |
| | | /// <summary> |
| | | /// 添加场景action |
| | | /// </summary> |
| | | public Action AddAction; |
| | | |
| | | #endregion |
| | | |
| | |
| | | /// </summary> |
| | | public override void RemoveFromParent() |
| | | { |
| | | Category.instance?.RefreshBodyView(); |
| | | UserView.HomePage.Instance.ScrollEnabled = true; |
| | | base.RemoveFromParent(); |
| | | } |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public void RefreshTargetListView() |
| | | { |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | TargetListScrolView.RemoveAll(); |
| | | TargetListScrolView.Height = Application.GetRealHeight(173); |
| | | var TargetListScrolBackView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(173), |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor |
| | | }; |
| | | TargetListScrolView.AddChidren(TargetListScrolBackView); |
| | | |
| | | if (sceneTargetDevicesList.Count > 0) |
| | | { |
| | | foreach (var targetDevice in sceneTargetDevicesList) |
| | | if (sceneTargetDevicesList.Count > 1) |
| | | { |
| | | TargetListScrolView.Height = Application.GetRealHeight(140 * sceneTargetDevicesList.Count) + Application.GetRealHeight(200); |
| | | TargetListScrolBackView.Height = Application.GetRealHeight(140 * sceneTargetDevicesList.Count + 13); |
| | | } |
| | | |
| | | for (int i = 0; i < sceneTargetDevicesList.Count; i++) |
| | | { |
| | | var targetDevice = sceneTargetDevicesList[i]; |
| | | var targetRowLayout = new RowLayout() |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | LineColor = ZigbeeColor.Current.GXCBackgroundColor, |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor |
| | | Y = Application.GetRealHeight(i * 140), |
| | | Height = Application.GetRealHeight(140), |
| | | LineColor = ZigbeeColor.Current.GXCClearColor, |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, |
| | | SubViewWidth = Application.GetRealWidth(184) |
| | | }; |
| | | TargetListScrolView.AddChidren(targetRowLayout); |
| | | string devImgPath = string.Empty; |
| | |
| | | { |
| | | if (targetDevice.DeviceUI == null || targetDevice.DeviceUI.CommonDevice == null) continue; |
| | | devImgPath = targetDevice.DeviceUI.IconPath; |
| | | devNameText = targetDevice.DeviceUI.CommonDevice.DeviceEpointName; |
| | | devNameText = Common.LocalDevice.Current.GetDeviceEpointName(targetDevice.DeviceUI.CommonDevice); |
| | | |
| | | var targetRow = new SceneTargetFunctionRow(23); |
| | | targetRowLayout.AddChidren(targetRow); |
| | | var targetRow = new SceneTargetFunctionRow(13); |
| | | targetRow.Init(); |
| | | targetRow.SetIcon(devImgPath); |
| | | targetRow.SetNameText(devNameText); |
| | | targetRow.SetZoneText(targetDevice.DeviceUI.GetZone()); |
| | | targetRow.SetStatuText(targetDevice.GetDeviceStatu()); |
| | | targetRowLayout.AddChidren(targetRow); |
| | | if (i == sceneTargetDevicesList.Count - 1) |
| | | { |
| | | targetRow.HideLine(true); |
| | | } |
| | | } |
| | | else if (targetDevice.Type == 2) |
| | | { |
| | | devNameText = CommonFormResouce.GetTimeString(targetDevice.DelayTime); |
| | | devNameText += Language.StringByID(R.MyInternationalizationString.Later); |
| | | var targetRow = new SceneTargetTimeRow(23); |
| | | targetRowLayout.AddChidren(targetRow); |
| | | var targetRow = new SceneTargetTimeRow(13); |
| | | targetRow.Init(); |
| | | targetRow.SetTitle(devNameText); |
| | | targetRowLayout.AddChidren(targetRow); |
| | | if (i == sceneTargetDevicesList.Count - 1) |
| | | { |
| | | targetRow.HideLine(true); |
| | | } |
| | | } |
| | | else if (targetDevice.Type == 1) |
| | | { |
| | | devImgPath = "Scene/SceneIcon.png"; |
| | | devNameText = targetDevice.SceneName; |
| | | |
| | | var targetRow = new SceneTargetFunctionRow(23); |
| | | targetRowLayout.AddChidren(targetRow); |
| | | var targetRow = new SceneTargetFunctionRow(13); |
| | | targetRow.Init(); |
| | | targetRow.SetIcon(devImgPath); |
| | | targetRow.SetNameText(devNameText); |
| | | targetRow.SetZoneText(targetDevice.SceneUI.GetZone()); |
| | | targetRowLayout.AddChidren(targetRow); |
| | | if (i == sceneTargetDevicesList.Count - 1) |
| | | { |
| | | targetRow.HideLine(true); |
| | | } |
| | | } |
| | | |
| | | var editBtn = new Button() |
| | | { |
| | | BackgroundColor = ZigbeeColor.Current.GXCEditBackGroundColor, |
| | | TextID = R.MyInternationalizationString.Edit, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | }; |
| | | var editBtn = new RowLayoutEditButton(); |
| | | targetRowLayout.AddRightView(editBtn); |
| | | //编辑设备 |
| | | editBtn.MouseUpEventHandler += detailMouseUpEventHandler; |
| | | var delBtn = new Button() |
| | | { |
| | | BackgroundColor = ZigbeeColor.Current.GXCRedColor, |
| | | TextID = R.MyInternationalizationString.Delete, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | }; |
| | | var delBtn = new RowLayoutDeleteButton(); |
| | | targetRowLayout.AddRightView(delBtn); |
| | | //删除设备 |
| | | delBtn.MouseUpEventHandler += (sender, e) => |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (sceneTargetDevicesList.Count > 1) |
| | | { |
| | | var targetRowLayout = new RowLayout() |
| | | { |
| | | Height = Application.GetRealHeight(300), |
| | | LineColor = ZigbeeColor.Current.GXCBackgroundColor, |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor |
| | | }; |
| | | TargetListScrolView.AddChidren(targetRowLayout); |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | private void AddBodyView() |
| | | { |
| | | bodyFrameLayout = new FrameLayout() |
| | | var bodyScrolView=new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(184), |
| | | Height = Application.GetRealHeight(1737), |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor, |
| | | }; |
| | | AddChidren(bodyFrameLayout); |
| | | AddChidren(bodyScrolView); |
| | | |
| | | bodyFrameLayout = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(1086+127), |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor, |
| | | }; |
| | | bodyScrolView.AddChidren(bodyFrameLayout); |
| | | |
| | | var imgFL = new FrameLayout |
| | | { |
| | |
| | | }; |
| | | bodyFrameLayout.AddChidren(imgFL); |
| | | |
| | | var backGround1 = new ImageView() |
| | | { |
| | | Y = Application.GetRealHeight(46), |
| | | Width = Application.GetMinRealAverage(916), |
| | | Height = Application.GetMinRealAverage(487), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | ImagePath = "Room/Room_Rectangle.png" |
| | | }; |
| | | imgFL.AddChidren(backGround1); |
| | | |
| | | backGround = new ImageView() |
| | | { |
| | | Width = Application.GetMinRealAverage(930), |
| | | Height = Application.GetMinRealAverage(464), |
| | | Gravity = Gravity.Center, |
| | | Y = Application.GetRealHeight(46), |
| | | Width = Application.GetMinRealAverage(887), |
| | | Height = Application.GetMinRealAverage(444), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Radius = (uint)Application.GetMinRealAverage(CommonFormResouce.BigFormRadius), |
| | | ImagePath = "SceneIcon/3.jpg" |
| | | }; |
| | | imgFL.AddChidren(backGround); |
| | | backGround.SetViewShadow(true); |
| | | |
| | | var infoFL = new FrameLayout |
| | | { |
| | | Y = imgFL.Bottom + Application.GetRealHeight(23), |
| | | Height = Application.GetRealHeight(418), |
| | | Y = Application.GetRealHeight(588), |
| | | Height = Application.GetRealHeight(429), |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor |
| | | }; |
| | | bodyFrameLayout.AddChidren(infoFL); |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 15, |
| | | IsBold=true |
| | | //IsBold=true |
| | | }; |
| | | infoFL.AddChidren(infoEdit); |
| | | |
| | |
| | | |
| | | var targetFL = new FrameLayout() |
| | | { |
| | | Y = infoFL.Bottom + Application.GetRealHeight(23), |
| | | Height = Application.GetRealHeight(730) |
| | | Y = Application.GetRealHeight(1040), |
| | | Height = Application.GetRealHeight(346) |
| | | }; |
| | | bodyFrameLayout.AddChidren(targetFL); |
| | | |
| | |
| | | }; |
| | | addTargetFL.AddChidren(targetLine); |
| | | |
| | | TargetListScrolView = new VerticalScrolViewLayout() |
| | | TargetListScrolView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(49+127), |
| | | Height = Application.GetRealHeight(730-127-49), |
| | | Height = Application.GetRealHeight(173) |
| | | }; |
| | | targetFL.AddChidren(TargetListScrolView); |
| | | bodyScrolView.AddChidren(TargetListScrolView); |
| | | |
| | | |
| | | |
| | | confirmBtn = new CommonForm.CompleteButton(1656, 907, 127); |
| | | confirmBtn.TextID = R.MyInternationalizationString.Next; |
| | |
| | | var fileName = $"SceneIcon_{tradeTime}.png"; |
| | | //通过相机拍照裁剪 |
| | | CropImage.TakePicture((imagePath) => |
| | | { |
| | | {
|
| | | if (string.IsNullOrEmpty(imagePath)) |
| | | { |
| | | return; |
| | | }
|
| | | if (isModify) |
| | | { |
| | | if (IconPathType != 0) |
| | |
| | | var fileName = $"SceneIcon_{tradeTime}.png"; |
| | | //从相册选择图片裁剪 |
| | | CropImage.SelectPicture((imagePath) => |
| | | { |
| | | {
|
| | | if (string.IsNullOrEmpty(imagePath)) |
| | | { |
| | | return; |
| | | }
|
| | | if (isModify) |
| | | { |
| | | if (IconPathType != 0) |
| | |
| | | //区域 |
| | | EventHandler<MouseEventArgs> zoneHander = (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) |
| | | { |
| | | if (Common.Room.CurrentRoom.GetRoomsByFloorId(floor.Key).Count > 0) |
| | | { |
| | | floorIds.Add(floor.Key); |
| | | floorNames.Add(floor.Value); |
| | | |
| | | 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 += zoneHander; |
| | | |
| | |
| | | } |
| | | if (curRoom.IsSharedRoom) |
| | | { |
| | | RemoveFromParent(); |
| | | RoomCommon.ShowTipRoomIsShared(); |
| | | return; |
| | | } |
| | | |
| | |
| | | { |
| | | if (string.IsNullOrEmpty(nameRow.NameText.Text)) |
| | | { |
| | | var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.SceneNameCannotBeNull), Language.StringByID(R.MyInternationalizationString.Close)); |
| | | alert.Show(); |
| | | alert.ResultEventHandler += (sendAlert, eAlert) => |
| | | { |
| | | return; |
| | | }; |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.SceneNameCannotBeNull)); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | |
| | | if (OldIconPathType != 0) |
| | | { |
| | | Shared.IO.FileUtils.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, OldBackgroundImagePath)); |
| | | HdlAutoBackupLogic.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, OldBackgroundImagePath)); |
| | | |
| | | HdlAutoBackupLogic.DeleteFile(OldBackgroundImagePath); |
| | | } |
| | | if (IconPathType == 1 || IconPathType == 2) |
| | | { |
| | | Shared.IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), backGround.ImageBytes); |
| | | HdlAutoBackupLogic.AddOrEditorFile(System.IO.Path.Combine(Config.Instance.FullPath, fileName)); |
| | | HdlAutoBackupLogic.AddOrEditorFile(fileName); |
| | | modifySceneUI.IconPath = fileName; |
| | | } |
| | | else |
| | |
| | | Epoint = sceneTarget.DeviceUI.CommonDevice.DeviceEpoint, |
| | | TaskList = sceneTarget.TaskList, |
| | | DelayTime = 0, |
| | | MemberNumber = i+1 |
| | | MemberNumber = i + 1 |
| | | }; |
| | | memberDataList.Add(memberData); |
| | | } |
| | |
| | | ScenesId = 0, |
| | | ElseScenesId = sceneTarget.ElseScenesId, |
| | | DelayTime = 0, |
| | | MemberNumber = i+1 |
| | | MemberNumber = i + 1 |
| | | }; |
| | | memberDataList.Add(memberData); |
| | | } |
| | |
| | | Type = 2, |
| | | ScenesId = 0, |
| | | DelayTime = sceneTarget.DelayTime, |
| | | MemberNumber = i+1 |
| | | MemberNumber = i + 1 |
| | | }; |
| | | memberDataList.Add(memberData); |
| | | } |
| | |
| | | var removeDevice = new ZigBee.Device.Scene.RemoveSceneDeviceListInfo |
| | | { |
| | | Type = 2, |
| | | DelayTime=sceneTarget.DelayTime, |
| | | MemberNumber=sceneTarget.DelayTimeSerialNumber |
| | | DelayTime = sceneTarget.DelayTime, |
| | | MemberNumber = sceneTarget.DelayTimeSerialNumber |
| | | }; |
| | | removeSceneDeviceListInfoList.Add(removeDevice); |
| | | } |
| | |
| | | modifyRoom.Save(); |
| | | curRoom.Save(); |
| | | } |
| | | EditorAction?.Invoke(modifySceneUI, curRoom); |
| | | RemoveFromParent(); |
| | | } |
| | | else if (result == 0) |
| | | { |
| | | Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain); |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.FailedPleaseTryAgain)); |
| | | } |
| | | else if (result == -1) |
| | | { |
| | | Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist); |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist)); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | //新增 |
| | | if (string.IsNullOrEmpty(nameRow.NameText.Text)) |
| | | { |
| | | var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.SceneNameCannotBeNull), Language.StringByID(R.MyInternationalizationString.Close)); |
| | | alert.Show(); |
| | | alert.ResultEventHandler += (sendAlert, eAlert) => |
| | | { |
| | | return; |
| | | }; |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.SceneNameCannotBeNull)); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | |
| | | if (IconPathType == 1 || IconPathType == 2) |
| | | { |
| | | Shared.IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), backGround.ImageBytes); |
| | | HdlAutoBackupLogic.AddOrEditorFile(fileName); |
| | | imgPath = fileName; |
| | | } |
| | | else |
| | | { |
| | | imgPath = backGround.ImagePath; |
| | | } |
| | | if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null) |
| | | { |
| | | Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist); |
| | | return; |
| | | } |
| | | //if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null) |
| | | //{ |
| | | // CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist)); |
| | | // return; |
| | | //} |
| | | CommonPage.Loading.Start(); |
| | | var memberDataList = new List<ZigBee.Device.Scene.AddSceneMemberData>(); |
| | | for (int i = 0; i < sceneTargetDevicesList.Count; i++) |
| | |
| | | } |
| | | } |
| | | |
| | | var result = await curRoom.AddScene(nameRow.NameText.Text, imgPath, memberDataList); |
| | | var result = await curRoom.AddScene(nameRow.NameText.Text, imgPath, memberDataList, IconPathType); |
| | | if (result == 1) |
| | | { |
| | | AddAction?.Invoke(); |
| | | RemoveFromParent(); |
| | | } |
| | | else if (result == 0) |
| | | { |
| | | CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.AddSceneFail); |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.AddSceneFail)); |
| | | } |
| | | else if (result == -1) |
| | | { |
| | | CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist); |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist)); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | dialog.RemoveFromParent(); |
| | | }; |
| | | |
| | | open.SeekBar.ProgressChanged += (sender, e) => |
| | | open.SeekBar.OnProgressChangedEvent += (sender, e) => |
| | | { |
| | | open.IsSelected = true; |
| | | shut.IsSelected = false; |
| | |
| | | { |
| | | open.IsSelected = true; |
| | | shut.IsSelected = false; |
| | | open.SetProgress(sceneTarget.TaskList[0].Data2); |
| | | open.SetSeekBarProgress(sceneTarget.TaskList[0].Data2); |
| | | } |
| | | } |
| | | |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | dialog.RemoveFromParent(); |
| | | }; |
| | | |
| | | open.SeekBar.ProgressChanged += (sender, e) => |
| | | open.SeekBar.OnProgressChangedEvent += (sender, e) => |
| | | { |
| | | open.IsSelected = true; |
| | | shut.IsSelected = false; |
| | |
| | | { |
| | | open.IsSelected = true; |
| | | shut.IsSelected = false; |
| | | open.SetProgress(sceneTarget.TaskList[0].Data1); |
| | | open.SetSeekBarProgress(sceneTarget.TaskList[0].Data1); |
| | | } |
| | | } |
| | | |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |