| | |
| | | fanSpeedList = device.GetAttribute(FunctionAttributeKey.FanSpeed).value; |
| | | btnFan.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | ShowFanSelectView(); |
| | | if (btnSwitch.IsSelected) |
| | | { |
| | | ShowFanSelectView(); |
| | | } |
| | | }; |
| | | //风速文本 |
| | | this.btnFanView = new NormalViewControl(this.FrameWhiteCentet1.Width / 3, Application.GetRealHeight(18), false); |
| | |
| | | var menuContr = new DialogTitleMenuControl(valueCount, Language.StringByID(StringId.FanSpeed)); |
| | | //menuContr.X = Application.GetRealWidth(209); |
| | | menuContr.Gravity = Gravity.CenterHorizontal; |
| | | menuContr.Y = Application.GetRealHeight(231); |
| | | menuContr.Width = Application.GetRealWidth(160); |
| | | if (valueCount > 2) |
| | | { |
| | | menuContr.Height = Application.GetRealHeight(199); |
| | | } |
| | | else |
| | | { |
| | | menuContr.Height = Application.GetRealHeight(154); |
| | | } |
| | | dialogBody.AddChidren(menuContr); |
| | | |
| | | int count = 0; |
| | | foreach(var fanAttrValue in fanAttr.value) |
| | | { |
| | | bool isSelecte = false; |
| | |
| | | isSelecte = true; |
| | | } |
| | | } |
| | | else if(fanAttrValue == "auto") |
| | | { |
| | | text = Language.StringByID(StringId.Auto); |
| | | iconPath = "FunctionIcon/AirFresh/Fan2.png"; |
| | | if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "auto" ) |
| | | { |
| | | iconPath = "FunctionIcon/AirFresh/Fan2Select.png"; |
| | | isSelecte = true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | count++; |
| | | menuContr.AddRowMenu(text, iconPath, isSelecte, () => |
| | | { |
| | | frameBack.Close(); |
| | |
| | | this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, fanAttrValue); |
| | | }); |
| | | } |
| | | menuContr.Y = Application.GetRealHeight(231 - (46 * (count-3))); |
| | | |
| | | } |
| | | |