wxr
2023-07-18 762eed3a31840aa91ac508c63b8df54029cf0262
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -1910,6 +1910,7 @@
                {
                    isColorful = true;
                    LoadColorfulRow(colorfulStatus);
                    isColorful = colorfulStatus.value == "on";
                }
            }
            foreach (var attr in sceneFunction.status)
@@ -1983,7 +1984,20 @@
            {
                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
                {
@@ -2030,6 +2044,9 @@
                    this.RemoveFromParent();
                }
            };
            UpdataFunctionRow();
        }
        void UpdataFunctionRow()
@@ -2544,11 +2561,13 @@
            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) =>
@@ -2609,10 +2628,10 @@
                    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";
@@ -2627,6 +2646,7 @@
                    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)
                        {