| | |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | OpenAngle = 160, |
| | | ThumbImagePath = fh.trait_on_off.value.ToString() == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png", |
| | | ThumbImagePath = fh.trait_on_off.curValue.ToString() == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png", |
| | | ThumbImageHeight = Application.GetRealWidth(50), |
| | | ProgressBarColor = fh.trait_on_off.value.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2, // 0xFFFC9C04 : CSS_Color.PromptingColor2, |
| | | ProgressBarColor = fh.trait_on_off.curValue.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2, // 0xFFFC9C04 : CSS_Color.PromptingColor2, |
| | | MinValue = 5, |
| | | MaxValue = 35, |
| | | IsClickable = fh.trait_on_off.value.ToString() == "on", |
| | | IsClickable = fh.trait_on_off.curValue.ToString() == "on", |
| | | ArcColor = CSS_Color.BackgroundColor, |
| | | Progress = Convert.ToInt32(fh.trait_temp.value), |
| | | Progress = Convert.ToInt32(fh.trait_temp.curValue), |
| | | #if __IOS__ |
| | | Y = Application.GetRealHeight(120+25), |
| | | Width = Application.GetRealWidth(260-40), |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 56, |
| | | IsBold = true, |
| | | Text = fh.trait_temp.value.ToString(), |
| | | Text = fh.trait_temp.curValue.ToString(), |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | controlView.AddChidren(btnTemp); |
| | |
| | | Height = Application.GetRealWidth(40), |
| | | UnSelectedImagePath = "Public/PowerClose.png", |
| | | SelectedImagePath = "Public/PowerOpen.png", |
| | | IsSelected = fh.trait_on_off.value.ToString() == "on" |
| | | IsSelected = fh.trait_on_off.curValue.ToString() == "on" |
| | | }; |
| | | controlView.AddChidren(btnSwitch); |
| | | |
| | |
| | | }; |
| | | modeChangeView.AddChidren(btnLine); |
| | | |
| | | foreach (var m in fh.trait_mode.value_key) |
| | | foreach (var m in fh.trait_mode.value) |
| | | { |
| | | Button btnModeIcon = new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = Application.GetRealHeight(44 * (fh.trait_mode.value_key.IndexOf(m) + 1) + 10 + 8), |
| | | Y = Application.GetRealHeight(44 * (fh.trait_mode.value.IndexOf(m) + 1) + 10 + 8), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | IsSelected = fh.trait_mode.value.ToString() == m, |
| | | IsSelected = fh.trait_mode.curValue.ToString() == m, |
| | | }; |
| | | modeChangeView.AddChidren(btnModeIcon); |
| | | |
| | | Button btnModeText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12) + btnModeIcon.Right, |
| | | Y = Application.GetRealHeight(44 * (fh.trait_mode.value_key.IndexOf(m) + 1) + 8), |
| | | Y = Application.GetRealHeight(44 * (fh.trait_mode.value.IndexOf(m) + 1) + 8), |
| | | Height = Application.GetRealHeight(44), |
| | | Width = Application.GetRealWidth(70), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | IsSelected = fh.trait_mode.value.ToString() == m, |
| | | IsSelected = fh.trait_mode.curValue.ToString() == m, |
| | | }; |
| | | modeChangeView.AddChidren(btnModeText); |
| | | |
| | |
| | | break; |
| | | } |
| | | |
| | | if (fh.trait_mode.value_key.IndexOf(m) < fh.trait_mode.value_key.Count - 1) |
| | | if (fh.trait_mode.value.IndexOf(m) < fh.trait_mode.value.Count - 1) |
| | | { |
| | | modeChangeView.AddChidren(new Button() |
| | | { |