old mode 100644
new mode 100755
File was renamed from Home0630/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs |
| | |
| | | int heightValue = ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace;
|
| | | var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac);
|
| | | if (isShow == true)
|
| | | { |
| | | //备注:面板中只显示真实的设备,其他属于绑定的回路不显示 |
| | | //获取这一堆设备时属于什么类型的 |
| | | {
|
| | | //备注:面板中只显示真实的设备,其他属于绑定的回路不显示
|
| | | //获取这一堆设备时属于什么类型的
|
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
|
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction) |
| | | { |
| | | var listTemp = Common.LocalDevice.Current.GetMutilfunctionPanelByMac(listDevice); |
| | | //展开模式时,扩大依据为:它有几个子控件 |
| | | heightValue = (listTemp.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace); |
| | | //标题自己就是一个子控件 |
| | | if (rowInfo.frameTable.ChildrenCount == 1) |
| | | { |
| | | foreach (CommonDevice info in listTemp) |
| | | { |
| | | //加载它的列表 |
| | | this.AddDeviceDetailRow(rowInfo.frameTable, info, deviceEnumInfo); |
| | | } |
| | | } |
| | | }else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir |
| | | || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment) |
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
|
| | | {
|
| | | var listTemp = Common.LocalDevice.Current.GetPanelMatchEpointByMac(listDevice); |
| | | //展开模式时,扩大依据为:它有几个子控件 |
| | | heightValue = (listTemp.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace); |
| | | //标题自己就是一个子控件 |
| | | if (rowInfo.frameTable.ChildrenCount == 1) |
| | | { |
| | | foreach (CommonDevice info in listTemp) |
| | | { |
| | | //加载它的列表 |
| | | this.AddDeviceDetailRow(rowInfo.frameTable, info, deviceEnumInfo); |
| | | } |
| | | var listTemp = Common.LocalDevice.Current.GetMutilfunctionPanelByMac(listDevice);
|
| | | //展开模式时,扩大依据为:它有几个子控件
|
| | | heightValue = (listTemp.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace);
|
| | | //标题自己就是一个子控件
|
| | | if (rowInfo.frameTable.ChildrenCount == 1)
|
| | | {
|
| | | foreach (CommonDevice info in listTemp)
|
| | | {
|
| | | //加载它的列表
|
| | | this.AddDeviceDetailRow(rowInfo.frameTable, info, deviceEnumInfo);
|
| | | }
|
| | | }
|
| | | } |
| | | else |
| | | { |
| | | //展开模式时,扩大依据为:它有几个子控件 |
| | | heightValue = (listDevice.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace); |
| | | //标题自己就是一个子控件 |
| | | if (rowInfo.frameTable.ChildrenCount == 1) |
| | | { |
| | | foreach (CommonDevice info in listDevice) |
| | | { |
| | | //加载它的列表 |
| | | this.AddDeviceDetailRow(rowInfo.frameTable, info, deviceEnumInfo); |
| | | } |
| | | }
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir
|
| | | || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
|
| | | {
|
| | | var listTemp = Common.LocalDevice.Current.GetPanelMatchEpointByMac(listDevice);
|
| | | //展开模式时,扩大依据为:它有几个子控件
|
| | | heightValue = (listTemp.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace);
|
| | | //标题自己就是一个子控件
|
| | | if (rowInfo.frameTable.ChildrenCount == 1)
|
| | | {
|
| | | foreach (CommonDevice info in listTemp)
|
| | | {
|
| | | //加载它的列表
|
| | | this.AddDeviceDetailRow(rowInfo.frameTable, info, deviceEnumInfo);
|
| | | }
|
| | | }
|
| | | } |
| | | }
|
| | | else
|
| | | {
|
| | | //展开模式时,扩大依据为:它有几个子控件
|
| | | heightValue = (listDevice.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace);
|
| | | //标题自己就是一个子控件
|
| | | if (rowInfo.frameTable.ChildrenCount == 1)
|
| | | {
|
| | | foreach (CommonDevice info in listDevice)
|
| | | {
|
| | | //加载它的列表
|
| | | this.AddDeviceDetailRow(rowInfo.frameTable, info, deviceEnumInfo);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | //自身高度变更
|
| | | rowInfo.frameTable.Height = heightValue;
|
| | |
| | | {
|
| | | var form = new DeviceFunctionSettionForm();
|
| | | form.AddForm(device, true);
|
| | | } |
| | | //新风面板 |
| | | }
|
| | | //新风面板
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
|
| | | {
|
| | | //方悦新风面板的按键配置
|
| | |
| | | var form = new DeviceFunctionSettionForm();
|
| | | form.AddForm(device, true);
|
| | | }
|
| | | } |
| | | //简约环境面板的按键配置 |
| | | }
|
| | | //简约环境面板的按键配置
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
|
| | | { |
| | | |
| | | {
|
| | |
|
| | | if (device.Type == DeviceType.FreshAir || device.Type == DeviceType.Thermostat)
|
| | | {
|
| | | var form = new DevicePanel.PanelSimpleEnvironmentButtonSettionForm(); |
| | | var form = new DevicePanel.PanelSimpleEnvironmentButtonSettionForm();
|
| | | form.AddForm(device);
|
| | | }
|
| | | else
|
| | |
| | | var form = new DeviceFunctionSettionForm();
|
| | | form.AddForm(device, true);
|
| | | }
|
| | | } |
| | | //简约环境面板的按键配置 |
| | | }
|
| | | //简约环境面板的按键配置
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
|
| | | { |
| | | var form = new DeviceFunctionSettionForm(); |
| | | {
|
| | | var form = new DeviceFunctionSettionForm();
|
| | | form.AddForm(device, true);
|
| | | } |
| | | //方悦面板 |
| | | }
|
| | | //方悦面板
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueTwo
|
| | | || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFour
|
| | | || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEight)
|
| | |
| | | /// </summary>
|
| | | private void StartCheckDeviceAlarm()
|
| | | {
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceListFormSensor", ReceiveComandDiv.A传感器上报, (device) => |
| | | { |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | if (this.dicRowInfo.ContainsKey(device.DeviceAddr) == false) |
| | | { |
| | | return; |
| | | } |
| | | //显示传感器上报的特效 |
| | | this.dicRowInfo[device.DeviceAddr].MenuRow?.StartSensorPushAppeal(); |
| | | }); |
| | | });
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceListFormSensor", ReceiveComandDiv.A传感器上报, (device) =>
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | if (this.dicRowInfo.ContainsKey(device.DeviceAddr) == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //显示传感器上报的特效
|
| | | this.dicRowInfo[device.DeviceAddr].MenuRow?.StartSensorPushAppeal();
|
| | | });
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | if (device == null || device.DeviceAddr == null)
|
| | | {
|
| | | continue;
|
| | | } |
| | | |
| | | //获取设备类型的 |
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); |
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment) |
| | | { |
| | | foreach (var outClu in device.OutClusterList) |
| | | { |
| | | //去掉简约环境面板类的各种服务端设备,室内机不显示 |
| | | if (outClu.OutCluster == 513) |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | //获取设备类型的
|
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
|
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
|
| | | {
|
| | | foreach (var outClu in device.OutClusterList)
|
| | | {
|
| | | //去掉简约环境面板类的各种服务端设备,室内机不显示
|
| | | if (outClu.OutCluster == 513)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | }
|
| | | if (dic.ContainsKey(device.DeviceAddr) == false)
|
| | | {
|
| | | dic[device.DeviceAddr] = new List<CommonDevice>();
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | #region ■ 自定义智能音箱控件_____________________
|
| | | #region ■ 自定义智能音箱控件_________________
|
| | |
|
| | | /// <summary>
|
| | | /// 自定义网关控件
|