| | |
| | | dimmerBar.OnStartTrackingTouchEvent = (sender, e) => |
| | | { |
| | | onDimmerBar = true; |
| | | dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1); |
| | | }; |
| | | dimmerBar.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | |
| | | function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString()); |
| | | if(dimmerBar.Progress > 0) |
| | | { |
| | | d.Add(FunctionAttributeKey.OnOff, "on"); |
| | | } |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | btnBrightnessText.Text = dimmerBar.Progress + "%"; |
| | | }; |
| | | //20201223 删除滑动发送命令,防止控件跳动 |
| | | dimmerBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1); |
| | | |
| | | //function.fadeTime = 0; |
| | | //if (!btnSwitch.IsSelected) |
| | | //{ |