| | |
| | | } |
| | | break; |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SensorMmvPose: |
| | | { |
| | | string key = this.GetKey(dicList); |
| | | string value = this.GetValue(dicList); |
| | |
| | | //区别不同设备,显示不同设备状态 |
| | | switch (device.spk) |
| | | { |
| | | |
| | | case SPK.AirSwitch: |
| | | case SPK.LightSwitch: |
| | | //插座 |
| | | case SPK.PanelSocket: |
| | | case SPK.ElectricSocket: |
| | | //机械手 |
| | | case SPK.MechanicalArm: |
| | | {//开关 |
| | | |
| | | foreach (var dic in dicList) |
| | |
| | | else if (brightness != "") |
| | | { |
| | | stateStr = brightness + "%"; |
| | | } |
| | | if (device.spk == SPK.LightCCT) |
| | | { |
| | | //色温这个属性才有效 |
| | | if (stateStr != Language.StringByID(StringId.offLogic) && GetKeyValue("cct", dicList) != "") |
| | | { |
| | | stateStr += "," +GetKeyValue("cct", dicList) + "k"; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | case SPK.MusicStandard: |
| | | case SPK.AvMusic: |
| | | { |
| | | foreach (var dic in dicList) |
| | | string song_name = GetKeyValue("song_name", dicList); |
| | | string volume = GetKeyValue("volume", dicList); |
| | | stateStr = song_name + ";" +Language.StringByID(StringId.volumeMusic)+volume; |
| | | if (stateStr.StartsWith(";")) |
| | | { |
| | | if (dic["key"] == "song_name") |
| | | { |
| | | stateStr = dic["value"]?.ToString(); |
| | | } |
| | | stateStr = stateStr.Substring(1, stateStr.Length - 1); |
| | | }else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic))) |
| | | { |
| | | stateStr = stateStr.Substring(0, stateStr.Length - 3); |
| | | } |
| | | } |
| | | break; |
| | |
| | | //开关灯光 |
| | | case SPK.AirSwitch: |
| | | case SPK.LightSwitch: |
| | | //机械手 |
| | | case SPK.MechanicalArm: |
| | | { |
| | | foreach (var dic in dicList) |
| | | { |
| | |
| | | break; |
| | | } |
| | | button2.Text = value + "%"; |
| | | } |
| | | break; |
| | | case "cct": |
| | | { |
| | | if (button3 == null) |
| | | { |
| | | //怕调试软件乱上东西导致抛异常 |
| | | break; |
| | | } |
| | | button3.Text = value + "k"; |
| | | } |
| | | break; |
| | | } |
| | |
| | | } |
| | | break; |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SensorMmvPose: |
| | | { |
| | | foreach (var dic in dicList) |
| | | { |
| | |
| | | if (dic["key"] == "song_name") |
| | | { |
| | | button1.Text = dic["value"]?.ToString(); |
| | | } |
| | | else if (dic["key"] == "volume") |
| | | { |
| | | button2.Text = dic["value"]?.ToString(); |
| | | } |
| | | } |
| | | } |
| | |
| | | //区别不同设备,显示不同设备状态 |
| | | switch (device.spk) |
| | | { |
| | | case SPK.MechanicalArm: |
| | | case SPK.AirSwitch: |
| | | case SPK.LightSwitch: |
| | | {//开关灯 |