| | |
| | | this.ShowProgressBar();
|
| | |
|
| | | //获取绑定目标设备
|
| | | List<CommonDevice> listDevice = await HdlDeviceBindLogic.Current.GetBindTargetDevice(this.deviceIASZone);
|
| | | List<CommonDevice> listDevice = HdlDeviceBindLogic.Current.GetBindTargetDevice(this.deviceIASZone);
|
| | | if (listDevice == null)
|
| | | {
|
| | | //关闭进度条
|
| | |
| | | }
|
| | |
|
| | | //获取pir的配置信息
|
| | | this.pirConfigure = await HdlDevicePirSensorLogic.Current.GetPirSensorLightSettion(deviceIASZone);
|
| | | this.pirConfigure = HdlDevicePirSensorLogic.Current.GetPirSensorLightSettion(deviceIASZone);
|
| | | if (pirConfigure == null)
|
| | | {
|
| | | //关闭进度条
|
| | |
| | |
|
| | | PickerView.ShowSecondary(listfirst, listSecond, (value1, value2) =>
|
| | | {
|
| | | btnTime.Text = listfirst[value1] + listSecond[value1][value2];
|
| | | btnTime.Text = listfirst[value1].TrimStart('0') + listSecond[value1][value2];
|
| | | int minute = Convert.ToInt32(listfirst[value1].Substring(0, 2));
|
| | | int second = Convert.ToInt32(listSecond[value1][value2].Substring(0, 2));
|
| | | int delaySecond = minute * 60 + second;
|
| | |
| | | /// <summary>
|
| | | /// 保存Pir传感器数据
|
| | | /// </summary>
|
| | | private async void SavePirSensorData()
|
| | | private void SavePirSensorData()
|
| | | {
|
| | | if (this.isDataChanged == false)
|
| | | {
|
| | |
| | | if (listDelDevice.Count > 0)
|
| | | {
|
| | | //删除目标
|
| | | var listSucess = await HdlDeviceBindLogic.Current.DeleteDeviceTarget(deviceIASZone, listDelDevice);
|
| | | var listSucess = HdlDeviceBindLogic.Current.DeleteDeviceTarget(deviceIASZone, listDelDevice);
|
| | | if (listSucess == null || listSucess.Count == 0)
|
| | | {
|
| | | //关闭进度条
|
| | |
| | | if (listLightDevice.Count > 0)
|
| | | {
|
| | | //删除调光器镞
|
| | | listSucess = await HdlDeviceBindLogic.Current.DeleteDeviceTarget(deviceIASZone, listLightDevice, 8);
|
| | | listSucess = HdlDeviceBindLogic.Current.DeleteDeviceTarget(deviceIASZone, listLightDevice, 8);
|
| | | if (listSucess == null || listSucess.Count == 0)
|
| | | {
|
| | | //关闭进度条
|
| | |
| | | if (listSaveDevice.Count > 0)
|
| | | {
|
| | | //绑定目标
|
| | | var listSucess = await HdlDeviceBindLogic.Current.BindDeviceTarget(deviceIASZone, listBind);
|
| | | var listSucess = HdlDeviceBindLogic.Current.BindDeviceTarget(deviceIASZone, listBind);
|
| | | if (listSucess == null || listSucess.Count == 0)
|
| | | {
|
| | | //关闭进度条
|
| | |
| | | if (listLightDevice.Count > 0)
|
| | | {
|
| | | //绑定调光镞
|
| | | listSucess = await HdlDeviceBindLogic.Current.BindDeviceTarget(deviceIASZone, listLightDevice, 8);
|
| | | listSucess = HdlDeviceBindLogic.Current.BindDeviceTarget(deviceIASZone, listLightDevice, 8);
|
| | | if (listSucess == null || listSucess.Count == 0)
|
| | | {
|
| | | //关闭进度条
|
| | |
| | | }
|
| | | }
|
| | | //保存pir配置信息
|
| | | var result = await HdlDevicePirSensorLogic.Current.SetPirSensorSettion(this.deviceIASZone, this.pirConfigure);
|
| | | var result = HdlDevicePirSensorLogic.Current.SetPirSensorSettion(this.deviceIASZone, this.pirConfigure);
|
| | | if (result == false)
|
| | | {
|
| | | //关闭进度条
|