| | |
| | | LoadSwitchEvent(); |
| | | LoadEvent_BackCenterColor(); |
| | | LoadEvent_DimmerBar(); |
| | | LoadEvet_ChangeFadeTime(); |
| | | //回退刷新信息事件 |
| | | actionRefresh = () => { |
| | | btnFunctionName.Text = btnFunctionName_Out.Text = light.name; |
| | |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("brightness", light.brightness.ToString()); |
| | | Control.SendWriteCommand(light, d); |
| | | light.fadeTime = barFadeTime.Progress; |
| | | //Control.Send(CommandType_A.write, light); |
| | | }; |
| | | dimmerBar.OnProgressChangedEvent = (sender, e) => { |
| | | light.fadeTime = 0; |
| | | if (!btnSwitch.IsSelected) |
| | | { |
| | | dimmerBar.ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改灯光渐变时间 |
| | | /// </summary> |
| | | void LoadEvet_ChangeFadeTime() |
| | | { |
| | | barFadeTime.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | light.fadeTime = e; |
| | | light.SaveFunctionData(); |
| | | }; |
| | | } |
| | | /// <summary> |
| | | /// 加载开关事件 |
| | | /// </summary> |
| | | void LoadSwitchEvent() |