| | |
| | | /// <summary> |
| | | /// 按键管理 |
| | | /// </summary> |
| | | public class BindTargetsPage : BindCommonLayout, ZigBee.Common.IStatus |
| | | public class BindTargetsPage : BindCommonLayout |
| | | { |
| | | /// <summary> |
| | | /// 按键模式接收 |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | public void Changed(CommonDevice common) |
| | | { |
| | | Shared.Application.RunOnMainThread(() => |
| | | { |
| | | }); |
| | | } |
| | | |
| | | /// 构造函数 |
| | | /// </summary> |
| | | /// <param name="doorLock"></param> |
| | |
| | | localDeviceList.Add(dev); |
| | | } |
| | | //获取本地场景列表 |
| | | scList = Shared.Common.Room.AllRoomSceneUIList; |
| | | scList = HdlSceneLogic.Current.GetAllRoomSceneList(); |
| | | //获取网关场景表 |
| | | var gwSceneObj = await currentKey.GetSceneInfoAsync(); |
| | | if (gwSceneObj != null && gwSceneObj.getSceneInfo != null) |
| | | if (gwScenesList.Count == 0) |
| | | { |
| | | gwScenesList = gwSceneObj.getSceneInfo.ScenesList; |
| | | var gwSceneObj = await currentKey.GetSceneInfoAsync(); |
| | | if (gwSceneObj != null && gwSceneObj.getSceneInfo != null) |
| | | { |
| | | gwScenesList = gwSceneObj.getSceneInfo.ScenesList; |
| | | } |
| | | } |
| | | |
| | | //动态获取按键支持的大类 |
| | | typeModeList = await GetTypeMode(); |
| | | #region 读取面板当前模式 |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | midVerticalRefreshLayout.EndHeaderRefreshing(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | return; |
| | | }); |
| | |
| | | { |
| | | RefreshList(); |
| | | CommonPage.Loading.Hide(); |
| | | midVerticalRefreshLayout.EndHeaderRefreshing(); |
| | | }); |
| | | } |
| | | else |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | midVerticalRefreshLayout.EndHeaderRefreshing(); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | }); |
| | | return; |
| | |
| | | midVerticalRefreshLayout.BeginHeaderRefreshing(); |
| | | IsRead = true; |
| | | InitListInfo(); |
| | | midVerticalRefreshLayout.EndHeaderRefreshing(); |
| | | }; |
| | | |
| | | BlankPicUI(); |
| | |
| | | midVerticalRefreshLayout.AddChidrenRow(rowLayout); |
| | | rowLayout.frameTable.UseClickStatu = false; |
| | | var devicePic = rowLayout.frameTable.AddLeftIcon(); |
| | | devicePic.Y = Application.GetRealHeight(49); |
| | | devicePic.UnSelectedImagePath = "DoorLock/DoorLockUserPic.png"; |
| | | |
| | | #region 绑定数据处理 |
| | |
| | | } |
| | | if (isExistScene) |
| | | { |
| | | curSceneUI = Room.CurrentRoom.GetSceneUIBySceneId(bindDevice.BindScenesId);
|
| | | curSceneUI = HdlSceneLogic.Current.GetSceneUIBySceneId(bindDevice.BindScenesId);
|
| | | devicePic.UnSelectedImagePath = "Scene/SceneIcon.png"; |
| | | if (curSceneUI == null) |
| | | { |
| | |
| | | else |
| | | { |
| | | btnBindNameText = curSceneUI.Name; |
| | | if (curSceneUI.GetZone() != null) |
| | | string myName = HdlSceneLogic.Current.GetZoneById(curSceneUI.Id); |
| | | if (myName != null) |
| | | { |
| | | btnFloorRoomNameText = curSceneUI.GetZone(); |
| | | btnFloorRoomNameText = myName; |
| | | } |
| | | } |
| | | } |
| | |
| | | if (tempDev != null) |
| | | { |
| | | //获取设备所属房间 |
| | | var tempDevRoom = Common.Room.CurrentRoom.GetRoomByDevice(tempDev); |
| | | var tempDevRoom = HdlRoomLogic.Current.GetRoomByDevice(tempDev); |
| | | |
| | | if (tempDevRoom != null) |
| | | { |
| | |
| | | { |
| | | btnFloorRoomNameText = tempDevFloorName + "," + tempDevRoomName; |
| | | } |
| | | } |
| | | var deviceUi = Common.LocalDevice.Current.GetDeviceUI(tempDev); |
| | | if (deviceUi != null) |
| | | { |
| | | devicePic.UnSelectedImagePath = deviceUi.IconPath; |
| | | devicePic.Width = Application.GetRealWidth(110); |
| | | devicePic.Text = ""; |
| | | } |
| | | }
|
| | |
|
| | | devicePic.UnSelectedImagePath = tempDev.IconPath;
|
| | | devicePic.Text = ""; |
| | | |
| | | if (string.IsNullOrEmpty(tempDev.DeviceEpointName)) |
| | | { |
| | | btnBindNameText = tempDev.DeviceEpoint + Language.StringByID(R.MyInternationalizationString.uDeviceCircuit); |
| | |
| | | else |
| | | { |
| | | btnBindNameText = bindDevice.BindMacAddr + "_" + bindDevice.BindEpoint; |
| | | devicePic.Width = Application.GetMinRealAverage(200); |
| | | devicePic.TextAlignment = TextAlignment.CenterLeft; |
| | | devicePic.TextColor = UserCenterColor.Current.Gray; |
| | | devicePic.Text = Language.StringByID(R.MyInternationalizationString.uOffLine); |
| | |
| | | localDeviceList.Clear(); |
| | | scList.Clear(); |
| | | base.RemoveFromParent(); |
| | | } |
| | | |
| | | public void DeviceInfoChange(CommonDevice common, string typeTag) |
| | | { |
| | | } |
| | | |
| | | public void ChangedILogicStatus(ZigBee.Device.Logic logic) |
| | | { |
| | | } |
| | | |
| | | public void ChangedISceneStatus(Scene scene) |
| | | { |
| | | } |
| | | } |
| | | } |