xm
2020-04-16 6fa9d69da922c8049f5acfcbb9ce9fd26811024c
ZigbeeApp/Shared/Common/Device.cs
old mode 100644 new mode 100755
File was renamed from ZigbeeApp20200414/Shared/Common/Device.cs
@@ -980,26 +980,38 @@
                return this.GetDeviceMacName(device);
            }
            //同一设备里面,不同类型的回路,它的命名都从1开始
            int epointNo = 0;
            var listSort = this.GetDevicesByMac(device.DeviceAddr);
            foreach (var myDevice in listSort)
            {
                if (myDevice.Type == device.Type)
                {
                    //同一类型编号+1
                    epointNo++;
                    if (myDevice.DeviceEpoint == device.DeviceEpoint)
                    {
                        //已经到达它自己
                        break;
                    }
                }
            }
            if (device.Type == DeviceType.OnOffOutput
                || device.Type == DeviceType.DimmableLight || device.Type == DeviceType.ColorDimmableLight)
            {
                //继电器,掉光器都叫回路
                return Language.StringByID(R.MyInternationalizationString.uDeviceCircuit) + device.DeviceEpoint;
                return Language.StringByID(R.MyInternationalizationString.uDeviceCircuit) + epointNo;
            }
            else if (device.Type == DeviceType.Thermostat)
            if (device.Type == DeviceType.Thermostat)
            {
                //空调都叫室内机
                return Language.StringByID(R.MyInternationalizationString.uIndoorUnit) + device.DeviceEpoint;
                return Language.StringByID(R.MyInternationalizationString.uIndoorUnit) + epointNo;
            }
            else if (device.Type == DeviceType.FreshAir)
            {
                //新风面板中的按键叫新风
                return Language.StringByID(R.MyInternationalizationString.FreshAir);
            }
            else if (device.Type == DeviceType.TemperatureSensor)
            {
                //新风面板中的Thermostat为温度传感器
                return Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
            }
            else if (device.Type == DeviceType.FreshAirHumiditySensor)
            {
@@ -1014,16 +1026,29 @@
                //面板的干接点叫按键
                if (deviceInfoType.BeloneType == DeviceBeloneType.A按键面板)
                {
                    return Language.StringByID(R.MyInternationalizationString.uPanelButton) + device.DeviceEpoint;
                    return Language.StringByID(R.MyInternationalizationString.uPanelButton) + epointNo;
                }
                //其他的干接点叫干接点
                else
                {
                    return Language.StringByID(R.MyInternationalizationString.uDeviceBelongId16) + device.DeviceEpoint;
                    return Language.StringByID(R.MyInternationalizationString.uDeviceBelongId16) + epointNo;
                }
            }
            else if (device.Type == DeviceType.TemperatureSensor)
            {
                if (deviceInfoType.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                {
                    //新风面板中的Thermostat为温度传感器
                    return Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
                }
                else if (deviceInfoType.BeloneType == DeviceBeloneType.A按键面板)
                {
                    //面板的温度探头叫  面板名字+温度
                    return Language.StringByID(deviceInfoType.DefultNameId) + Language.StringByID(R.MyInternationalizationString.uTemperature);
                }
            }
            //其他情况,使用它的默认名称
            return Language.StringByID(deviceInfoType.DefultNameId) + device.DeviceEpoint;
            return Language.StringByID(deviceInfoType.DefultNameId) + epointNo;
        }
        /// <summary>