| | |
| | | /// </summary> |
| | | public int OldIconPathType; |
| | | |
| | | CommonDevice temperDevice; |
| | | public CommonDevice temperDevice; |
| | | |
| | | CommonDevice humidDevice; |
| | | public CommonDevice humidDevice; |
| | | |
| | | DeviceInfoRow temperatureRow; |
| | | |
| | |
| | | //是否为当前设备 |
| | | 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), |
| | |
| | | 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;
|
| | | } |