黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs
@@ -527,7 +527,7 @@
                    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);
@@ -556,7 +556,7 @@
                {
                    line2.Visible = false;
                }
                if (Common.LocalDevice.Current.CheckDeviceIsOnline(device) == true)
                if (HdlDeviceCommonLogic.Current.CheckDeviceIsOnline(device) == true)
                {
                    btnBindName.TextColor = Shared.Common.ZigbeeColor.Current.TextBlack;
                }
@@ -573,14 +573,14 @@
                        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:
@@ -752,12 +752,12 @@
                            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);
@@ -771,7 +771,7 @@
                                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);
@@ -834,7 +834,7 @@
                            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)
                                {
@@ -854,7 +854,7 @@
                                if (canUpdateBindName)
                                {
                                    //更新外面目标名字:具体名字【刷新本地界面会导致外部目标变化】
                                    string bindName = Common.LocalDevice.Current.GetDeviceEpointName(dev);
                                    string bindName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(dev);
                                    switch (curDeviceBindType)
                                    {
                                        case BindInfo.BindType.Temperature:
@@ -1196,19 +1196,19 @@
                            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;
                            }
@@ -1406,9 +1406,9 @@
            {
                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)
                        {
@@ -1498,7 +1498,7 @@
                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)
            {