| | |
| | | void LoadColorChangeEvent() |
| | | { |
| | | DateTime colorChangeTime = DateTime.MinValue; |
| | | //bool send = false; |
| | | |
| | | //当前点击的【点】是否正确 |
| | | bool pointIsRight = false; |
| | |
| | | //pointIsRight:点的区域不是圆盘内 |
| | | return; |
| | | } |
| | | lastColor = e2; |
| | | //if (send) |
| | | //{ |
| | | lastColor = e2; |
| | | // send = false; |
| | | //} |
| | | }; |
| | | |
| | | //colorPicker.MouseUpEventHandler += (sender, e) => { |
| | | // send = true; |
| | | //}; |
| | | |
| | | colorPicker.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | if (function.trait_on_off.curValue.ToString() == "off") |
| | |
| | | lightTemp.SetRGBcolor(lastColor, function); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.RGB, lightTemp.GetRGBcolorString(function)); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | Control.Ins.SendWriteCommand(function, d,false,0); |
| | | break; |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | void LoadEvet_ChangeFadeTime() |
| | | { |
| | | barFadeTime.OnStopTrackingTouchEvent = (sender, e) => |
| | | if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null) |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress); |
| | | function.UpdataFuncitonInfo(); |
| | | }; |
| | | barFadeTime.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | function.SaveFunctionFile(); |
| | | }; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 加载开关事件 |
| | |
| | | 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) |