| | |
| | | return; |
| | | } |
| | | deviceUI.CommonDevice.DeviceStatusReport = common.DeviceStatusReport; |
| | | var curTemp = (attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default; |
| | | switch (attriButeList[0].AttributeId) |
| | | foreach(var attList in attriButeList) |
| | | { |
| | | case 0: |
| | | ac.currentLocalTemperature = curTemp; |
| | | ac.LastDateTime = DateTime.Now; |
| | | indoorTemperatureBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {ac.currentLocalTemperature} ℃"; |
| | | //currentTemperatureBtn.Text = $"{ac.currentLocalTemperature} ℃"; |
| | | break; |
| | | var curTemp = (attList.AttriButeData / 100 < ACControlBase.Temperature_High || attList.AttriButeData / 100 > ACControlBase.Temperature_Low) ? attList.AttriButeData / 100 : ACControlBase.Temperature_Default; |
| | | switch (attList.AttributeId) |
| | | { |
| | | case 0: |
| | | ac.currentLocalTemperature = curTemp; |
| | | ac.LastDateTime = DateTime.Now; |
| | | indoorTemperatureBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {ac.currentLocalTemperature} ℃"; |
| | | //currentTemperatureBtn.Text = $"{ac.currentLocalTemperature} ℃"; |
| | | break; |
| | | |
| | | case 17: |
| | | ac.currentCoolingSetpoint = curTemp; |
| | | if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8) |
| | | { |
| | | mArcScaleSeekBar.Progress = ac.currentCoolingSetpoint; |
| | | } |
| | | case 17: |
| | | ac.currentCoolingSetpoint = curTemp; |
| | | if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8) |
| | | { |
| | | mArcScaleSeekBar.Progress = ac.currentCoolingSetpoint; |
| | | } |
| | | |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | |
| | | case 18: |
| | | ac.currentHeatingSetpoint = curTemp; |
| | | if (ac.currentSystemMode == 4) |
| | | { |
| | | mArcScaleSeekBar.Progress = ac.currentHeatingSetpoint; |
| | | } |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | case 18: |
| | | ac.currentHeatingSetpoint = curTemp; |
| | | if (ac.currentSystemMode == 4) |
| | | { |
| | | mArcScaleSeekBar.Progress = ac.currentHeatingSetpoint; |
| | | } |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | |
| | | case 4096: |
| | | ac.currentAutoSetpoint = curTemp; |
| | | if (ac.currentSystemMode == 1) |
| | | { |
| | | mArcScaleSeekBar.Progress = ac.currentAutoSetpoint; |
| | | } |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | case 4096: |
| | | ac.currentAutoSetpoint = curTemp; |
| | | if (ac.currentSystemMode == 1) |
| | | { |
| | | mArcScaleSeekBar.Progress = ac.currentAutoSetpoint; |
| | | } |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | |
| | | case 28: |
| | | //此属性描述恒温设备正处于哪种模式 |
| | | //Off = 0 Auto = 1 Cool = 3 Heat = 4 FanOnly = 7 Dry = 8 |
| | | ac.currentSystemMode = attriButeList[0].AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | if (ac.currentSystemMode == 0) |
| | | { |
| | | switchBtn.IsSelected = false; |
| | | modeBtn.IsSelected = false; |
| | | modeBtn.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(ac.currentSystemMode); |
| | | modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(ac.currentSystemMode); |
| | | currentModeBtn.Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode); |
| | | case 28: |
| | | //此属性描述恒温设备正处于哪种模式 |
| | | //Off = 0 Auto = 1 Cool = 3 Heat = 4 FanOnly = 7 Dry = 8 |
| | | ac.currentSystemMode = attList.AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | if (ac.currentSystemMode == 0) |
| | | { |
| | | switchBtn.IsSelected = false; |
| | | modeBtn.IsSelected = false; |
| | | modeBtn.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(ac.currentSystemMode); |
| | | modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(ac.currentSystemMode); |
| | | currentModeBtn.Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode); |
| | | |
| | | mArcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(ac); |
| | | mArcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(ac); |
| | | |
| | | fanModeBtn.IsSelected = false; |
| | | FanSwingModeBtn.IsSelected = false; |
| | | } |
| | | else if (ac.currentSystemMode == 1 || ac.currentSystemMode == 3 || ac.currentSystemMode == 4 || ac.currentSystemMode == 7 || ac.currentSystemMode == 8) |
| | | { |
| | | switchBtn.IsSelected = true; |
| | | modeBtn.IsSelected = true; |
| | | modeBtn.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(ac.currentSystemMode); |
| | | modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(ac.currentSystemMode); |
| | | currentModeBtn.Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode); |
| | | fanModeBtn.IsSelected = false; |
| | | FanSwingModeBtn.IsSelected = false; |
| | | } |
| | | else if (ac.currentSystemMode == 1 || ac.currentSystemMode == 3 || ac.currentSystemMode == 4 || ac.currentSystemMode == 7 || ac.currentSystemMode == 8) |
| | | { |
| | | switchBtn.IsSelected = true; |
| | | modeBtn.IsSelected = true; |
| | | modeBtn.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(ac.currentSystemMode); |
| | | modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(ac.currentSystemMode); |
| | | currentModeBtn.Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode); |
| | | |
| | | mArcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(ac); |
| | | fanModeBtn.IsSelected = true; |
| | | FanSwingModeBtn.IsSelected = true; |
| | | } |
| | | break; |
| | | mArcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(ac); |
| | | fanModeBtn.IsSelected = true; |
| | | FanSwingModeBtn.IsSelected = true; |
| | | } |
| | | break; |
| | | |
| | | case 4097: |
| | | //过虑网清洗标志:42 |
| | | ac.CleanStatu = attriButeList[0].AttriButeData == 42; |
| | | cleanStatu.Visible = ac.CleanStatu; |
| | | break; |
| | | case 4097: |
| | | //过虑网清洗标志:42 |
| | | ac.CleanStatu = attList.AttriButeData == 42; |
| | | cleanStatu.Visible = ac.CleanStatu; |
| | | break; |
| | | |
| | | case 4099: |
| | | var value = Convert.ToString(attriButeList[0].AttriButeData, 2).PadLeft(16, '0'); |
| | | var modeStr = value.Substring(value.Length - 5, 5); |
| | | for (int j = 0; j < modeStr.Length; j++) |
| | | { |
| | | ac.listSupportMode[j] = Convert.ToInt32(modeStr[j]) == 49 ? 1 : 0; |
| | | } |
| | | break; |
| | | |
| | | case 4099: |
| | | var value = Convert.ToString(attList.AttriButeData, 2).PadLeft(16, '0'); |
| | | var modeStr = value.Substring(value.Length - 5, 5); |
| | | for (int j = 0; j < modeStr.Length; j++) |
| | | { |
| | | ac.listSupportMode[j] = Convert.ToInt32(modeStr[j]) == 49 ? 1 : 0; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (common.DeviceStatusReport.CluterID == 514) |
| | | { |
| | | var attriButeList = common.DeviceStatusReport.AttriBute; |
| | | if (attriButeList == null || attriButeList.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | | ac.DeviceStatusReport = common.DeviceStatusReport; |
| | | switch (attriButeList[0].AttributeId) |
| | | foreach(var attList in attriButeList) |
| | | { |
| | | case 0: |
| | | //风扇当前的工作模式 1=Low 2=Medium 3=High |
| | | ac.currentFanMode = attriButeList[0].AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | fanModeBtn.IsSelected = true; |
| | | fanModeBtn.SelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanModeId(ac.currentFanMode); |
| | | fanModeBtn.UnSelectedImagePath = ACControlBase.GetFanModeUnSelectedImagePathByFanModeId(ac.currentFanMode); |
| | | break; |
| | | case 4096: |
| | | //风扇当前的扫风模式 |
| | | ac.currentFanSwingMode = attriButeList[0].AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | FanSwingModeBtn.IsSelected = true; |
| | | FanSwingModeBtn.SelectedImagePath = ACControlBase.GetFanSwingModeSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode); |
| | | FanSwingModeBtn.UnSelectedImagePath = ACControlBase.GetFanSwingModeUnSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode); |
| | | break; |
| | | switch (attList.AttributeId) |
| | | { |
| | | case 0: |
| | | //风扇当前的工作模式 1=Low 2=Medium 3=High |
| | | ac.currentFanMode = attList.AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | fanModeBtn.IsSelected = true; |
| | | fanModeBtn.SelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanModeId(ac.currentFanMode); |
| | | fanModeBtn.UnSelectedImagePath = ACControlBase.GetFanModeUnSelectedImagePathByFanModeId(ac.currentFanMode); |
| | | break; |
| | | case 4096: |
| | | //风扇当前的扫风模式 |
| | | ac.currentFanSwingMode = attList.AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | FanSwingModeBtn.IsSelected = true; |
| | | FanSwingModeBtn.SelectedImagePath = ACControlBase.GetFanSwingModeSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode); |
| | | FanSwingModeBtn.UnSelectedImagePath = ACControlBase.GetFanSwingModeUnSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | //***新改 * **设备状态上报中,当CluterID = 3,证明设备在线,直接标记 |
| | |
| | | |
| | | currentModeBtn = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(599), |
| | | Y = Application.GetRealHeight(565), |
| | | Height = Application.GetRealHeight(80), |
| | | Width = Application.GetRealWidth(200), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | |
| | | reduceTemperatureBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(268), |
| | | Y = Application.GetRealHeight(680), |
| | | Y = Application.GetRealHeight(650), |
| | | Width = Application.GetMinRealAverage(80), |
| | | Height = Application.GetMinRealAverage(80), |
| | | UnSelectedImagePath = "AC/Reduce.png" |
| | |
| | | |
| | | addTemperatureBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(628), |
| | | Y = Application.GetRealHeight(680), |
| | | X = Application.GetRealWidth(620), |
| | | Y = Application.GetRealHeight(650), |
| | | Width = Application.GetMinRealAverage(80), |
| | | Height = Application.GetMinRealAverage(80), |
| | | UnSelectedImagePath = "AC/Add.png" |