| | |
| | | X = devicePic.Right + Application.GetRealWidth(20), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 15, |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device), |
| | | Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device), |
| | | }; |
| | | rowLayout.AddChidren(btnBindName); |
| | | |
| | |
| | | { |
| | | line2.Visible = false; |
| | | } |
| | | if (Common.LocalDevice.Current.CheckDeviceIsOnline(device) == true) |
| | | if (HdlDeviceCommonLogic.Current.CheckDeviceIsOnline(device) == true) |
| | | { |
| | | btnBindName.TextColor = Shared.Common.ZigbeeColor.Current.TextBlack; |
| | | } |
| | |
| | | devicePic.UnSelectedImagePath = "Device/SensorTemperature.png"; |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | btnBindName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor); |
| | | btnBindName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor); |
| | | } |
| | | break; |
| | | case DeviceBind.BindInfo.BindType.Humidity: |
| | | devicePic.UnSelectedImagePath = "Device/SensorHumidity.png"; |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | btnBindName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor); |
| | | btnBindName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor); |
| | | } |
| | | break; |
| | | case DeviceBind.BindInfo.BindType.PM: |
| | |
| | | var mainKey = bindDev.BindMacAddr + bindDev.BindEpoint; |
| | | |
| | | //分配的目标列表 |
| | | if (Shared.Common.LocalDevice.Current.listAllDevice.Count != 0) |
| | | if (HdlDeviceCommonLogic.Current.listAllDevice.Count != 0) |
| | | { |
| | | var dev = currentPanelSupportBindDeviceList.Find(obj => (obj != null) && (obj.DeviceAddr + obj.DeviceEpoint == mainKey)); |
| | | if (dev != null) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(dev.DeviceAddr, dev.DeviceEpoint); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(dev.DeviceAddr, dev.DeviceEpoint); |
| | | if (device != null) |
| | | { |
| | | BindTypeTargetsList(device, bindDev); |
| | |
| | | var dev = undistruibuteDevList.Find(obj => (obj != null) && (obj.DeviceAddr + obj.DeviceEpoint == mainKey)); |
| | | if (dev != null) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(dev.DeviceAddr, dev.DeviceEpoint); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(dev.DeviceAddr, dev.DeviceEpoint); |
| | | if (device != null) |
| | | { |
| | | BindTypeTargetsList(device, bindDev); |
| | |
| | | foreach (var dev in targetList) |
| | | { |
| | | //获取本地设备列表 |
| | | var localDeviceList = Shared.Common.LocalDevice.Current.listAllDevice; |
| | | var localDeviceList = HdlDeviceCommonLogic.Current.listAllDevice; |
| | | var tempDev = localDeviceList.Find(obj => obj.DeviceAddr == dev.DeviceAddr && obj.DeviceEpoint == dev.DeviceEpoint); |
| | | if (tempDev != null) |
| | | { |
| | |
| | | if (canUpdateBindName) |
| | | { |
| | | //更新外面目标名字:具体名字【刷新本地界面会导致外部目标变化】 |
| | | string bindName = Common.LocalDevice.Current.GetDeviceEpointName(dev); |
| | | string bindName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(dev); |
| | | switch (curDeviceBindType) |
| | | { |
| | | case BindInfo.BindType.Temperature: |
| | |
| | | addBindInfo.BindType = 0; |
| | | addBindInfo.BindMacAddr = de.DeviceAddr; |
| | | addBindInfo.BindEpoint = de.DeviceEpoint; |
| | | addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de); |
| | | addBindeDev.BindName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(de); |
| | | switch (curDeviceBindType) |
| | | { |
| | | case BindInfo.BindType.Temperature: |
| | | if (de.Type == DeviceType.PMSensor) |
| | | { |
| | | addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor); |
| | | addBindeDev.BindName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(de) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor); |
| | | } |
| | | break; |
| | | case BindInfo.BindType.Humidity: |
| | | if (de.Type == DeviceType.PMSensor) |
| | | { |
| | | addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor); |
| | | addBindeDev.BindName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(de) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor); |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | case BindInfo.BindType.FreshAir: |
| | | //获取设备类型的 |
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); |
| | | var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); |
| | | //新风面板的新风设备,则不显示 |
| | | if (deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir) |
| | | if (deviceEnumInfo.ConcreteType != DeviceConcreteType.ButtonPanel_FangyueFreshAir) |
| | | { |
| | | if (device.Type == DeviceType.FreshAir) |
| | | { |
| | |
| | | return; |
| | | } |
| | | //获取本地设备列表 |
| | | var localDeviceList = Shared.Common.LocalDevice.Current.listAllDevice; |
| | | var localDeviceList = HdlDeviceCommonLogic.Current.listAllDevice; |
| | | var tempDev = localDeviceList.Find(obj => obj.DeviceAddr == bindDev.DeviceAddr && obj.DeviceEpoint == bindDev.DeviceEpoint); |
| | | if (tempDev != null) |
| | | { |