| | |
| | | if (Common.LocalDevice.Current.GetDevicesCountByMac(listNewDevice[0].DeviceAddr) == 1)
|
| | | {
|
| | | //新风小模块只有一个回路,但要求新风小模块的新风有功能设置
|
| | | if (deviceEnumInfo.ConcreteType != DeviceConcreteType.Relay_FangyueFreshAirModul)
|
| | | //晾衣架默认只存储第一回路,其他回路被过滤了 |
| | | bool isSpecial = false; |
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.Relay_FangyueFreshAirModul) |
| | | { |
| | | isSpecial = true; |
| | | } |
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.Airer) |
| | | { |
| | | isSpecial = true; |
| | | var dev = listNewDevice[0]; |
| | | //晾衣架默认只存储第一回路,其他回路在功能界面需要读取时间,所以提前一个界面获取 |
| | | for (int i = 3; i < 6; i++) |
| | | { |
| | | //注意,衣架中的状态由不同端点获取 |
| | | //回路3:读取风干开关状态和时间值 |
| | | //回路4:读取烘干开关状态和时间值 |
| | | //回路5:读取消毒开关状态和时间值 |
| | | HdlDeviceAttributeLogic.Current.SendAirerComand(dev, i); |
| | | } |
| | | } |
| | | if (!isSpecial) |
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | var form = new DevicePanel.PanelFangyueFunctionSettionForm();
|
| | | form.AddForm(listNewDevice[0], deviceEnumInfo);
|
| | | }
|
| | | //简约多功能面板
|
| | | //简约多功能面板的按键配置 |
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
|
| | | {
|
| | | var form = new DeviceFunctionSettionForm();
|
| | | foreach (var dev in listNewDevice) |
| | | { |
| | | if (dev.Type == DeviceType.OnOffOutput && dev.DeviceEpoint == 62) |
| | | { |
| | | var form = new DeviceFunctionSettionForm(); |
| | | form.AddForm(dev, true); |
| | | break; |
| | | } |
| | | } |
| | | |
| | |
| | | var bD = device as TemperatureSensor;
|
| | | if (bD.SensorDiv == 1 && bDev.BindCluster == 1026)
|
| | | {
|
| | | if (string.IsNullOrEmpty(bDev.ESName))
|
| | | {
|
| | | bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | }
|
| | | else
|
| | | {
|
| | | bindTemperatureName = bDev.ESName;
|
| | | }
|
| | | bindTemperatureDev = device;
|
| | | }
|
| | | if (bD.SensorDiv == 2 && bDev.BindCluster == 1029)
|
| | | {
|
| | | if (string.IsNullOrEmpty(bDev.ESName))
|
| | | {
|
| | | bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | }
|
| | | else
|
| | | {
|
| | | bindHumidityName = bDev.ESName;
|
| | | }
|
| | |
|
| | | bindHumidityDev = device;
|
| | | }
|
| | | }
|
| | | if (device.Type == DeviceType.FreshAirHumiditySensor)
|
| | | {
|
| | | if (string.IsNullOrEmpty(bDev.ESName))
|
| | | {
|
| | | bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | }
|
| | | else
|
| | | {
|
| | | bindHumidityName = bDev.ESName;
|
| | | }
|
| | |
|
| | | bindHumidityDev = device;
|
| | | }
|
| | | }
|
| | |
| | | frame.AddRowMenu(deviceMenu, "Item/FixedPosition.png", "Item/FixedPositionSelected.png", () =>
|
| | | {
|
| | | //发送定位功能
|
| | | Common.LocalDevice.Current.SetFixedPositionCommand(listNewDevice[0]);
|
| | | Common.LocalDevice.Current.SetFixedPositionCommand(listNewDevice[0], true); |
| | | });
|
| | | }
|
| | |
|