| | |
| | | /// </summary> |
| | | public int OldIconPathType; |
| | | |
| | | CommonDevice temperDevice; |
| | | public CommonDevice temperDevice; |
| | | |
| | | CommonDevice humidDevice; |
| | | public CommonDevice humidDevice; |
| | | |
| | | DeviceInfoRow temperatureRow; |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region ◆ 接口__________________________ |
| | | /// <summary> |
| | | /// 处理变化事件 --将弃用 改用DeviceInfoChange() |
| | | /// </summary> |
| | | /// <returns>The changed.</returns> |
| | | /// <param name="common">Common.</param> |
| | | public void Changed(CommonDevice common) |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// Changeds the IL ogic status. |
| | | /// </summary> |
| | | /// <param name="logic">Logic.</param> |
| | | public void ChangedILogicStatus(ZigBee.Device.Logic logic) |
| | | { |
| | | //throw new NotImplementedException(); |
| | | } |
| | | /// <summary> |
| | | /// Changeds the IS cene status. |
| | | /// </summary> |
| | | /// <param name="scene">Scene.</param> |
| | | public void ChangedISceneStatus(Scene scene) |
| | | { |
| | | //throw new NotImplementedException(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设备状态更新接口 |
| | | /// <para>type:如果为 DeviceInComingRespon:设备新上报</para> |
| | |
| | | //是否为当前设备 |
| | | if ((temperDevice?.DeviceEpoint != common.DeviceEpoint || temperDevice?.DeviceAddr != common.DeviceAddr) && (humidDevice?.DeviceEpoint != common.DeviceEpoint || humidDevice?.DeviceAddr != common.DeviceAddr)) |
| | | { |
| | | //return; |
| | | return; |
| | | } |
| | | |
| | | //if (common.Type == DeviceType.TemperatureSensor) |
| | |
| | | }; |
| | | bodyFrameLayout.AddChidren(backGround1); |
| | | |
| | | |
| | | backGround = new ImageView() |
| | | { |
| | | Y = Application.GetRealHeight(60), |
| | |
| | | { |
| | | infoFL.AddChidren(floorRow); |
| | | } |
| | | floorRow.SetTitle(room.FloorName); |
| | | floorRow.SetTitle(HdlResidenceLogic.Current.GetFloorNameById(room.FloorId)); |
| | | floorRow.ClickBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (Config.Instance.Home.FloorDics != null) |
| | |
| | | PickerView.Show(floorNames, (index) => |
| | | { |
| | | room.FloorId = floorIds[index]; |
| | | floorRow.SetTitle(room.FloorName); |
| | | floorRow.SetTitle(HdlResidenceLogic.Current.GetFloorNameById(room.FloorId)); |
| | | }, floorIds.IndexOf(room.FloorId), Language.StringByID(R.MyInternationalizationString.BelongFloor), Language.StringByID(R.MyInternationalizationString.Confrim), Language.StringByID(R.MyInternationalizationString.Cancel)); |
| | | } |
| | | }; |
| | |
| | | return; |
| | | } |
| | | room.TemperatrueDevice = $"{selectTemp.DeviceAddr}{selectTemp.DeviceEpoint}"; |
| | | temperDevice=Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice); |
| | | temperatureRow.SetTitle(R.MyInternationalizationString.Getting); |
| | | //发送获取温度的命令 |
| | | ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(selectTemp); |
| | |
| | | { |
| | | temperatureRow.SetTitle(room.Temperatrue == 0 ? "--℃" : $"{room.Temperatrue}℃"); |
| | | //发送获取温度的命令 |
| | | var dev = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice); |
| | | ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(dev); |
| | | temperDevice = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice); |
| | | ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(temperDevice); |
| | | } |
| | | else |
| | | { |
| | |
| | | return; |
| | | } |
| | | room.HumidityDevice = $"{selectTemp.DeviceAddr}{selectTemp.DeviceEpoint}"; |
| | | humidDevice = Common.LocalDevice.Current.GetDevice(room.HumidityDevice); |
| | | humidityRow.SetTitle(R.MyInternationalizationString.Getting); |
| | | |
| | | //发送获取湿度的命令 |
| | |
| | | { |
| | | humidityRow.SetTitle(room.Humidity == 0 ? "--%" : $"{room.Humidity}%"); |
| | | //发送获取湿度的命令 |
| | | var dev = Common.LocalDevice.Current.GetDevice(room.HumidityDevice); |
| | | ReadDeviceAttributeLogic.Instance.SendHumidityStatuComand(dev); |
| | | humidDevice = Common.LocalDevice.Current.GetDevice(room.HumidityDevice); |
| | | ReadDeviceAttributeLogic.Instance.SendHumidityStatuComand(humidDevice); |
| | | } |
| | | else |
| | | { |
| | |
| | | if (Config.Instance.Home.FloorDics.Count == 0 || room.IsLove) |
| | | { |
| | | temperatureRow.Y = Application.GetRealHeight(308); |
| | | humidityRow.Y= Application.GetRealHeight(446); |
| | | humidityRow.Y = Application.GetRealHeight(446); |
| | | } |
| | | |
| | | var confirm = new Device.CommonForm.CompleteButton(1700, 900, 127); |
| | |
| | | //通过相机拍照裁剪 |
| | | CropImage.TakePicture((imagePath) => |
| | | {
|
| | | if (string.IsNullOrEmpty(imagePath) == true)
|
| | | if (string.IsNullOrEmpty(imagePath))
|
| | | {
|
| | | return;
|
| | | } |
| | |
| | | //从相册选择图片裁剪 |
| | | CropImage.SelectPicture((imagePath) => |
| | | { |
| | | if (string.IsNullOrEmpty(imagePath) == true)
|
| | | if (string.IsNullOrEmpty(imagePath))
|
| | | {
|
| | | return;
|
| | | } |