| | |
| | | /// </summary> |
| | | void LoadColorChangeEvent() |
| | | { |
| | | if (!function.isOnline()) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(MainPage.BaseView); |
| | | return; |
| | | } |
| | | DateTime colorChangeTime = DateTime.MinValue; |
| | | //bool send = false; |
| | | |
| | |
| | | /// </summary> |
| | | void LoadEvent_DimmerBar() |
| | | { |
| | | |
| | | dimmerBar.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | if (!function.isOnline()) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(MainPage.BaseView); |
| | | return; |
| | | } |
| | | curDimmerStatus = false; |
| | | function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | |
| | | |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | }; |
| | | if (function.isOnline()) |
| | | { |
| | | dimmerBar.OnStartTrackingTouchEvent = (sender, e) => |
| | | { |
| | | curDimmerStatus = onDimmerBar = true; |
| | |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 修改灯光渐变时间 |
| | |
| | | { |
| | | btnRestoredPoint.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (!function.isOnline()) |
| | | { |
| | | return; |
| | | } |
| | | if(function.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | return; |