| | |
| | | /// <summary> |
| | | /// 显示被绑定设备或场景的view |
| | | /// </summary> |
| | | VerticalFrameRefreshControl midVerticalScrolViewLayout; |
| | | VerticalRefreshLayout midVerticalScrolViewLayout; |
| | | /// <summary> |
| | | /// 显示房间的view |
| | | /// </summary> |
| | |
| | | btnMidTopLayout.AddChidren(btnHorizontalScrolViewLayout); |
| | | |
| | | //设备栏 |
| | | midVerticalScrolViewLayout = new VerticalFrameRefreshControl() |
| | | midVerticalScrolViewLayout = new VerticalRefreshLayout() |
| | | { |
| | | Y = btnMidTopLayout.Bottom, |
| | | Height = Application.GetRealHeight(1145), |
| | |
| | | |
| | | var delResult = new DelDeviceBindResponseAllData(); |
| | | delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); |
| | | if (delResult != null && delResult.removeBindResultResponseData != null) |
| | | { |
| | | if (delResult.removeBindResultResponseData.Result == 0) |
| | | { |
| | | switch (curDeviceBindType) |
| | | { |
| | | case 1: |
| | | if (actionFreshAirTarget != null) |
| | | { |
| | | actionFreshAirTarget(""); |
| | | } |
| | | break; |
| | | case 2: |
| | | if (actionTemperatureTarget != null) |
| | | { |
| | | actionTemperatureTarget(""); |
| | | } |
| | | break; |
| | | case 3: |
| | | if (actionHumidityTarget != null) |
| | | { |
| | | actionHumidityTarget(""); |
| | | } |
| | | break; |
| | | case 4: |
| | | if (actionPMTarget != null) |
| | | { |
| | | actionPMTarget(""); |
| | | } |
| | | break; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | this.RemoveFromParent(); |
| | | }); |
| | | |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | if (delResult == null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.OperrateFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | if (delResult.removeBindResultResponseData == null) |
| | | { |
| | | if (delResult.delDeviceBindResponseData != null) |
| | | { |
| | | foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) |
| | | { |
| | | if (d.Result == 1) |
| | | { |
| | | switch (curDeviceBindType) |
| | | { |
| | | case 1: |
| | | if (actionFreshAirTarget != null) |
| | | { |
| | | actionFreshAirTarget(""); |
| | | } |
| | | break; |
| | | case 2: |
| | | if (actionTemperatureTarget != null) |
| | | { |
| | | actionTemperatureTarget(""); |
| | | } |
| | | break; |
| | | case 3: |
| | | if (actionHumidityTarget != null) |
| | | { |
| | | actionHumidityTarget(""); |
| | | } |
| | | break; |
| | | case 4: |
| | | if (actionPMTarget != null) |
| | | { |
| | | actionPMTarget(""); |
| | | } |
| | | break; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | this.RemoveFromParent(); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (delResult.removeBindResultResponseData.Result == 0) |
| | | { |
| | | switch (curDeviceBindType) |
| | | { |
| | | case 1: |
| | | if (actionFreshAirTarget != null) |
| | | { |
| | | actionFreshAirTarget(""); |
| | | } |
| | | break; |
| | | case 2: |
| | | if (actionTemperatureTarget != null) |
| | | { |
| | | actionTemperatureTarget(""); |
| | | } |
| | | break; |
| | | case 3: |
| | | if (actionHumidityTarget != null) |
| | | { |
| | | actionHumidityTarget(""); |
| | | } |
| | | break; |
| | | case 4: |
| | | if (actionPMTarget != null) |
| | | { |
| | | actionPMTarget(""); |
| | | } |
| | | break; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | this.RemoveFromParent(); |
| | | }); |
| | | |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | var delDevice = DelBindDevice(bd); |
| | | var delResult = new DelDeviceBindResponseAllData(); |
| | | delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); |
| | | if (delResult == null || delResult.removeBindResultResponseData == null) |
| | | |
| | | if (delResult == null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | if (delResult.removeBindResultResponseData == null) |
| | | { |
| | | if (delResult.delDeviceBindResponseData != null) |
| | | { |
| | | foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) |
| | | { |
| | | if (d.Result != 1) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (delResult != null && delResult.removeBindResultResponseData != null) |
| | | { |
| | |
| | | var delDevice = DelBindDevice(curBindDevice); |
| | | var delResult = new DelDeviceBindResponseAllData(); |
| | | delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); |
| | | if (delResult == null || delResult.removeBindResultResponseData == null) |
| | | |
| | | if (delResult == null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | if (delResult.removeBindResultResponseData == null) |
| | | { |
| | | if (delResult.delDeviceBindResponseData != null) |
| | | { |
| | | foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) |
| | | { |
| | | if (d.Result != 1) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (delResult != null && delResult.removeBindResultResponseData != null) |
| | | { |
| | |
| | | addBindInfo.BindType = 0; |
| | | addBindInfo.BindMacAddr = de.DeviceAddr; |
| | | addBindInfo.BindEpoint = de.DeviceEpoint; |
| | | addBindeDev.BindName = de.DeviceEpointName; |
| | | addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de); |
| | | switch (curDeviceBindType) |
| | | { |
| | | case 2: |