From 23bbed132eea46eef51c6d01c21b346238e29ee2 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 30 六月 2022 13:39:12 +0800 Subject: [PATCH] Merge branch 'wxr0114' into V1.5.9 --- HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs | 130 +++++++++++++++++++++--------------------- 1 files changed, 65 insertions(+), 65 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs index 6a45090..ca02d57 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs @@ -366,15 +366,15 @@ }; EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => { - //if (!device.online) - //{ - // new Tip() - // { - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - // }.Show(MainPage.BaseView); - //} + if (!device.online) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.DeviceOfflineCannotOption), + Direction = AMPopTipDirection.None, + }.Show(MainPage.BaseView); + } btnModeIcon.IsSelected = btnModeText.IsSelected = true; device.SetAttrState(FunctionAttributeKey.Mode, m); btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(m); @@ -502,15 +502,15 @@ }; EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => { - //if (!device.online) - //{ - // new Tip() - // { - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - // }.Show(MainPage.BaseView); - //} + if (!device.online) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.DeviceOfflineCannotOption), + Direction = AMPopTipDirection.None, + }.Show(MainPage.BaseView); + } btnModeIcon.IsSelected = btnModeText.IsSelected = true; device.SetAttrState(FunctionAttributeKey.Swing, m); btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(m); @@ -626,15 +626,15 @@ }; EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => { - //if (!device.online) - //{ - // new Tip() - // { - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - // }.Show(MainPage.BaseView); - //} + if (!device.online) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.DeviceOfflineCannotOption), + Direction = AMPopTipDirection.None, + }.Show(MainPage.BaseView); + } btnFanIcon.IsSelected = btnFanText.IsSelected = true; device.SetAttrState(FunctionAttributeKey.FanSpeed, m); btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(m); @@ -822,15 +822,15 @@ btn.MouseUpEventHandler = (sender, e) => { - //if (!device.online) - //{ - // new Tip() - // { - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - // }.Show(MainPage.BaseView); - //} + if (!device.online) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.DeviceOfflineCannotOption), + Direction = AMPopTipDirection.None, + }.Show(MainPage.BaseView); + } Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(attr.key, ""); Control.Ins.SendWriteCommand(device, d); @@ -885,15 +885,15 @@ { btnMinus.MouseUpEventHandler = (sender, e) => { - //if (!device.online) - //{ - // new Tip() - // { - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - // }.Show(MainPage.BaseView); - //} + if (!device.online) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.DeviceOfflineCannotOption), + Direction = AMPopTipDirection.None, + }.Show(MainPage.BaseView); + } if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") { return; @@ -915,15 +915,15 @@ }; btnPlus.MouseUpEventHandler = (sender, e) => { - //if (!device.online) - //{ - // new Tip() - // { - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - // }.Show(MainPage.BaseView); - //} + if (!device.online) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.DeviceOfflineCannotOption), + Direction = AMPopTipDirection.None, + }.Show(MainPage.BaseView); + } if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") { return; @@ -941,7 +941,7 @@ d.Add(FunctionAttributeKey.SetTemp, temp.ToString()); Control.Ins.SendWriteCommand(device, d); }; - //if (device.online) + if (!device.online) { arcBar.OnStopTrackingTouchEvent = (sender, e) => { @@ -949,7 +949,7 @@ device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString()); btnTemp.Text = arcBar.Progress.ToString(); controlTime = DateTime.Now; - Dictionary<string, string> d = new Dictionary<string, string>(); + System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString()); Control.Ins.SendWriteCommand(device, d); }; @@ -1002,15 +1002,15 @@ btnSwitch.MouseUpEventHandler = (sender, e) => { - //if (!device.online) - //{ - // new Tip() - // { - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - // }.Show(MainPage.BaseView); - //} + if (!device.online) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.DeviceOfflineCannotOption), + Direction = AMPopTipDirection.None, + }.Show(MainPage.BaseView); + } btnSwitch.IsSelected = !btnSwitch.IsSelected; device.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off"; if (device.trait_on_off.curValue.ToString() == "on") -- Gitblit v1.8.0