| | |
| | | barFadeTime.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | var d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | //Control.Ins.SendWriteCommand(function, d); |
| | | function.SaveFunctionFile(); |
| | | }; |
| | | } |
| | |
| | | /// </summary> |
| | | void LoadEvent_DimmerBar() |
| | | { |
| | | if (function.online) |
| | | if (function.isOnline()) |
| | | { |
| | | dimmerBar.OnStartTrackingTouchEvent = (sender, e) => |
| | | { |
| | |
| | | { |
| | | btnSwitch.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (!function.online) |
| | | if (!function.isOnline()) |
| | | { |
| | | new Tip() |
| | | { |
| | |
| | | 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()); |
| | | if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null) |
| | | { |
| | | d.Add(FunctionAttributeKey.FadeTime, barFadeTime.Progress.ToString()); |
| | | } |
| | | //if (btnSwitch.IsSelected) |
| | | //{ |
| | | // if(function.lastBrightness == 0) |