| | |
| | | |
| | | if (sceneFunction.localFunction.spk == SPK.LightRGB || sceneFunction.localFunction.spk == SPK.GroupControl) |
| | | { |
| | | var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (colorfulStatus != null) |
| | | { |
| | | isColorful = true; |
| | | LoadColorfulRow(colorfulStatus); |
| | | isColorful = colorfulStatus.value == "on"; |
| | | } |
| | | //var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | //if (colorfulStatus != null) |
| | | //{ |
| | | // isColorful = true; |
| | | // LoadColorfulRow(colorfulStatus); |
| | | // isColorful = colorfulStatus.value == "on"; |
| | | //} |
| | | } |
| | | foreach (var attr in sceneFunction.status) |
| | | { |
| | |
| | | |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (sceneFunction.localFunction.spk == SPK.GroupControl) { } |
| | | if (sceneFunction.localFunction.spk == SPK.GroupControl) { |
| | | var colorBegin = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.ColorfulBegin); |
| | | if (colorBegin != null) |
| | | { |
| | | sceneFunction.status.Remove(colorBegin); |
| | | } |
| | | var colorEnd = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.ColorfulEnd); |
| | | if (colorEnd != null) |
| | | { |
| | | sceneFunction.status.Remove(colorEnd); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (isOnStatus) |
| | |
| | | /// <param name="btn"></param> |
| | | void LoadEditDialog_CCT(SceneFunctionStatus trait, Button btn) |
| | | { |
| | | if (trait.min == 0) |
| | | { |
| | | switch (trait.key) |
| | | { |
| | | case FunctionAttributeKey.SetTemp: |
| | | trait.min = 16; |
| | | break; |
| | | case FunctionAttributeKey.CCT: |
| | | trait.min = 2700; |
| | | break; |
| | | } |
| | | } |
| | | if (trait.max == 0) |
| | | { |
| | | switch (trait.key) |
| | | { |
| | | case FunctionAttributeKey.SetTemp: |
| | | trait.max = 30; |
| | | break; |
| | | case FunctionAttributeKey.CCT: |
| | | trait.max = 6500; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | double temp = trait.min; |
| | | |
| | | double.TryParse(trait.value, out temp); |
| | | trait.value = temp.ToString(); |
| | | |