old mode 100755
new mode 100644
| | |
| | | using static ZigBee.Device.BindObj; |
| | | namespace Shared.Phone.UserCenter.DeviceBind |
| | | { |
| | | public class ChooseKeyModePage : BindCommonLayout, ZigBee.Common.IStatus |
| | | public class ChooseKeyModePage : BindCommonLayout |
| | | { |
| | | /// <summary> |
| | | /// 按键模式接收 |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | public void Changed(CommonDevice common) |
| | | { |
| | | Shared.Application.RunOnMainThread(() => |
| | | { |
| | | }); |
| | | } |
| | | |
| | | /// 构造函数 |
| | | /// </summary> |
| | | /// <param name="doorLock"></param> |
| | |
| | | this.targetList = targetSelectList; |
| | | } |
| | | |
| | | #region ◆ 变量申明__________________________ |
| | | ZigBee.Device.Panel currentKey;//当前按键 |
| | | //显示被绑定设备或场景的view |
| | | VerticalScrolViewLayout midVerticalScrolViewLayout;//中部刷新列表 |
| | | HorizontalScrolViewLayout btnHorizontalScrolViewLayout;//房间列表左右滑动布局 |
| | | #region 变量申明 |
| | | /// <summary> |
| | | /// 当前按键 |
| | | /// </summary> |
| | | ZigBee.Device.Panel currentKey; |
| | | /// <summary> |
| | | /// 中部刷新列表 |
| | | /// </summary> |
| | | VerticalScrolViewLayout midVerticalScrolViewLayout; |
| | | /// <summary> |
| | | /// 房间列表左右滑动布局 |
| | | /// </summary> |
| | | HorizontalScrolViewLayout btnHorizontalScrolViewLayout; |
| | | /// <summary> |
| | | /// 按键配置的目标列表 |
| | | /// </summary> |
| | | List<CommonDevice> targetList = new List<CommonDevice>();//本地临时选中列表 |
| | | List<CommonDevice> targetList = new List<CommonDevice>(); |
| | | /// <summary> |
| | | /// 新的按键配置目标列表中,目标实际存在按键中,此时要删掉的数据 |
| | | /// 本地旧的选中列表 |
| | | /// </summary> |
| | | List<CommonDevice> oldTargetList = new List<CommonDevice>();//本地旧的选中列表 |
| | | int currentClusterID = 6;//当前簇ID |
| | | public Action<List<BindListResponseObj>> action;//回调绑定目标页面刷新 |
| | | int currentModeID = 0;//当前模式ID |
| | | string curDeviceBindType = "";//当前设备绑定类型 |
| | | List<CommonDevice> oldTargetList = new List<CommonDevice>(); |
| | | /// <summary> |
| | | /// 当前簇ID |
| | | /// </summary> |
| | | int currentClusterID = 6; |
| | | /// <summary> |
| | | /// 回调绑定目标页面刷新 |
| | | /// </summary> |
| | | public Action<List<BindListResponseObj>> action; |
| | | /// <summary> |
| | | /// 当前模式ID |
| | | /// </summary> |
| | | int currentModeID = 0; |
| | | /// <summary> |
| | | /// 当前设备绑定类型 |
| | | /// </summary> |
| | | string curDeviceBindType = ""; |
| | | /// <summary> |
| | | /// 类型的具体模式列表 |
| | | /// </summary> |
| | | List<int> typeDetailModeList = new List<int> { }; |
| | | #endregion |
| | | |
| | |
| | | |
| | | var dev = new AddedDeviceBindResponseAllData(); |
| | | dev = await currentKey.AddDeviceBindAsync(addBindeDev); |
| | | if (dev.addedDeviceBindResponseData == null) |
| | | if (dev != null || dev.addedDeviceBindResponseData == null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加开关模式 |
| | | /// </summary> |
| | | async private void AddSwitchMode() |
| | | { |
| | | if (typeDetailModeList == null) |
| | |
| | | |
| | | var btnChoose = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(60), |
| | | Height = Application.GetRealHeight(60), |
| | | Width = Application.GetMinReal(60), |
| | | Height = Application.GetMinReal(60), |
| | | X = Application.GetRealWidth(861 + 81), |
| | | Y = Application.GetRealHeight(35), |
| | | SelectedImagePath = "DoorLock/SelectedIcon.png", |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加调光模式 |
| | | /// </summary> |
| | | async private void AddDimmerMode() |
| | | { |
| | | if (typeDetailModeList == null) |
| | |
| | | |
| | | var btnChoose = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(60), |
| | | Height = Application.GetRealHeight(60), |
| | | Width = Application.GetMinReal(60), |
| | | Height = Application.GetMinReal(60), |
| | | X = Application.GetRealWidth(861 + 81), |
| | | Y = Application.GetRealHeight(35), |
| | | SelectedImagePath = "DoorLock/SelectedIcon.png", |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加窗帘模式 |
| | | /// </summary> |
| | | async private void AddCurtainMode() |
| | | { |
| | | if (typeDetailModeList == null) |
| | |
| | | |
| | | var btnChoose = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(60), |
| | | Height = Application.GetRealHeight(60), |
| | | Width = Application.GetMinReal(60), |
| | | Height = Application.GetMinReal(60), |
| | | X = Application.GetRealWidth(861 + 81), |
| | | Y = Application.GetRealHeight(35), |
| | | SelectedImagePath = "DoorLock/SelectedIcon.png", |
| | |
| | | btnChoose.MouseUpEventHandler += hander; |
| | | i++; |
| | | } |
| | | } |
| | | |
| | | public void DeviceInfoChange(CommonDevice common, string typeTag) |
| | | { |
| | | } |
| | | |
| | | public void ChangedILogicStatus(ZigBee.Device.Logic logic) |
| | | { |
| | | } |
| | | |
| | | public void ChangedISceneStatus(Scene scene) |
| | | { |
| | | } |
| | | } |
| | | } |