| | |
| | | { |
| | | btnCurtainClose.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (!function.online) |
| | | if (!function.isOnline()) |
| | | { |
| | | new Tip() |
| | | { |
| | |
| | | Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(MainPage.BaseView); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | { |
| | |
| | | { IsBackground = true }.Start(); |
| | | function.trait_on_off.curValue = "off"; |
| | | function.SetAttrState(FunctionAttributeKey.Percent, 0); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | var d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString()); |
| | | DriverLayer.Control.Ins.SendWriteCommand(function, d); |
| | | //CurtainAnimation(100); |
| | |
| | | |
| | | btnCurtainStop.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (!function.online) |
| | | if (!function.isOnline()) |
| | | { |
| | | new Tip() |
| | | { |
| | |
| | | Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(MainPage.BaseView); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => { |
| | | System.Threading.Thread.Sleep(2000); |
| | |
| | | |
| | | btnCurtainOpen.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (!function.online) |
| | | if (!function.isOnline()) |
| | | { |
| | | new Tip() |
| | | { |
| | |
| | | Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(MainPage.BaseView); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | { |
| | |
| | | // DriverLayer.Control.Ins.SendWriteCommand(function, d); |
| | | //}; |
| | | |
| | | if (!function.online) |
| | | if (function.isOnline()) |
| | | { |
| | | |
| | | btnCurtainStop.MouseDownEventHandler = (sender, e) => |