| | |
| | | |
| | | AC acFunction = new AC(); |
| | | |
| | | |
| | | /// <summary> |
| | | /// app自己控制的温度数值记录 |
| | | /// </summary> |
| | | List<string> seltControlTemp = new List<string>(); |
| | | |
| | | #endregion |
| | | |
| | |
| | | return; |
| | | } |
| | | var temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)); |
| | | if (temp <= device.GetAttribute(FunctionAttributeKey.Mode).min) |
| | | if (temp <= device.GetAttribute(FunctionAttributeKey.SetTemp).min) |
| | | { |
| | | return; |
| | | } |
| | | temp--; |
| | | seltControlTemp.Add(temp.ToString()); |
| | | arcBar.Progress = temp; |
| | | btnTemp.Text = temp.ToString(); |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | |
| | | return; |
| | | } |
| | | temp++; |
| | | seltControlTemp.Add(temp.ToString()); |
| | | arcBar.Progress = temp; |
| | | btnTemp.Text = temp.ToString(); |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | |
| | | btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode),false); |
| | | btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing),false); |
| | | btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed),false); |
| | | arcBar.Progress = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp))); |
| | | var updataTemp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp))); |
| | | |
| | | //app自己控制的不用更新,会造成跳动 |
| | | if (seltControlTemp.Contains(updataTemp.ToString())) |
| | | { |
| | | seltControlTemp.Remove(updataTemp.ToString()); |
| | | } |
| | | else |
| | | { |
| | | arcBar.Progress = updataTemp; |
| | | } |
| | | |
| | | if (device.trait_on_off.curValue.ToString() == "on") |
| | | { |
| | | btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = true; |
| | |
| | | arcBar.IsClickable = false; |
| | | arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |