| | |
| | | { |
| | | isColorful = true; |
| | | LoadColorfulRow(colorfulStatus); |
| | | isColorful = colorfulStatus.value == "on"; |
| | | } |
| | | } |
| | | foreach (var attr in sceneFunction.status) |
| | |
| | | { |
| | | if (isOnStatus) |
| | | { |
| | | |
| | | if (isColorful) |
| | | { |
| | | sceneFunction.status.Clear(); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.OnOff, value = "on" }); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.Colorful, value = "on" }); |
| | | } |
| | | else |
| | | { |
| | | var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (isHasColorful != null) |
| | | { |
| | | sceneFunction.status.Remove(isHasColorful); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | this.RemoveFromParent(); |
| | | } |
| | | }; |
| | | |
| | | |
| | | UpdataFunctionRow(); |
| | | } |
| | | |
| | | void UpdataFunctionRow() |
| | |
| | | |
| | | dialog.Show(); |
| | | |
| | | pView.MouseUpEventHandler = (sender, e) => { |
| | | pView.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | |
| | | btnCancel.MouseUpEventHandler = (sender, e) => { |
| | | btnCancel.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | btnOn.MouseUpEventHandler = (sender, e) => |
| | |
| | | MainPage.Log($"场景配置异常3:{ex.Message}"); |
| | | } |
| | | }; |
| | | btnOff.MouseUpEventHandler = (sender,e) =>{ |
| | | btnOff.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | trait.value = "off"; |
| | | isOnStatus = false; |
| | | try |
| | | { |
| | | sceneFunction.status.Find((obj) => obj.key == trait.key).value = "off"; |
| | |
| | | btn.Text = trait.GetValueText() + trait.GetUintString(); |
| | | if (trait.key == FunctionAttributeKey.OnOff) |
| | | { |
| | | isOnStatus = false; |
| | | var temp = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness); |
| | | if (temp == null) |
| | | { |