| | |
| | | } |
| | | LoadFunctionRow(onOffStatus); |
| | | |
| | | if (sceneFunction.localFunction.spk == SPK.LightRGB) |
| | | if (sceneFunction.localFunction.spk == SPK.LightRGB || sceneFunction.localFunction.spk == SPK.GroupControl) |
| | | { |
| | | var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (colorfulStatus != null) |
| | |
| | | |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (isOnStatus) |
| | | if (sceneFunction.localFunction.spk == SPK.GroupControl) { } |
| | | else |
| | | { |
| | | if (isColorful) |
| | | if (isOnStatus) |
| | | { |
| | | sceneFunction.status.Clear(); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.OnOff, value = "on" }); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.Colorful, value = "on" }); |
| | | 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 |
| | | { |
| | | var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (isHasColorful != null) |
| | | { |
| | | sceneFunction.status.Remove(isHasColorful); |
| | | } |
| | | sceneFunction.status.Clear(); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.OnOff, value = "off" }); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (isColorful) { } else { } |
| | | sceneFunction.status.Clear(); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.OnOff, value = "off" }); |
| | | } |
| | | |
| | | var temp = scene.functions.Find((obj) => obj.sid == sceneFunction.sid); |
| | | |
| | | if (temp != null) |
| | |
| | | |
| | | void UpdataFunctionRow() |
| | | { |
| | | for(var i =0;i< functionRowList.Count; i++) |
| | | for (var i =0;i< functionRowList.Count; i++) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | if (view.Tag.ToString() != FunctionAttributeKey.OnOff) |
| | | { |
| | | if (isColorful) |
| | | if (isColorful && sceneFunction.localFunction.spk == SPK.LightRGB) |
| | | { |
| | | if(view.Tag.ToString() != FunctionAttributeKey.Colorful) |
| | | { |