| | |
| | | /// </summary> |
| | | void LoadColorChangeEvent() |
| | | { |
| | | //if (!function.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | // return; |
| | | //} |
| | | if (!function.online) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(MainPage.BaseView); |
| | | return; |
| | | } |
| | | DateTime colorChangeTime = DateTime.MinValue; |
| | | //bool send = false; |
| | | |
| | | //当前点击的【点】是否正确 |
| | | bool pointIsRight = false; |
| | | //圆的半径(考虑边界,需要设置它的半径比较小一点) |
| | | int circleR = colorPicker.Width / 2 - Application.GetRealWidth(12); |
| | | int circleR = colorPicker.Width / 2 - Application.GetRealWidth(2); |
| | | |
| | | colorPicker.ColorChaged += (sender2, e2) => { |
| | | if (function.trait_on_off.curValue.ToString() == "off" || pointIsRight == false) |
| | |
| | | |
| | | dimmerBar.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | //if (!function.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | // return; |
| | | //} |
| | | if (!function.online) |
| | | { |
| | | 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.online) |
| | | if (function.online) |
| | | { |
| | | dimmerBar.OnStartTrackingTouchEvent = (sender, e) => |
| | | { |
| | |
| | | { |
| | | btnRestoredPoint.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | //if (!function.online) |
| | | //{ |
| | | // return; |
| | | //} |
| | | if (!function.online) |
| | | { |
| | | return; |
| | | } |
| | | if(function.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | return; |