| | |
| | | /// </summary> |
| | | void LoadEvet_ChangeFadeTime() |
| | | { |
| | | barFadeTime.OnStopTrackingTouchEvent = (sender, e) => |
| | | if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null) |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | function.UpdataFuncitonInfo(); |
| | | }; |
| | | barFadeTime.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | function.SaveFunctionFile(); |
| | | }; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | dimmerBar.OnStopTrackingTouchEvent = (sender, e) => { |
| | | onDimmerBar = false; |
| | | function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress); |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | |
| | | { |
| | | btnSwitch.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress); |
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected; |
| | | if (btnSwitch.IsSelected) |
| | | { |
| | |
| | | function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off"; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString()); |
| | | d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime)); |
| | | if (btnSwitch.IsSelected) |
| | | { |
| | | if(function.lastBrightness == 0) |