wxr
2022-06-30 cda315b3a19919cae922bdbe96bc20eab4e29fcc
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -367,15 +367,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);
@@ -503,15 +503,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);
@@ -627,15 +627,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);
@@ -823,15 +823,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);
@@ -886,15 +886,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;
@@ -916,15 +916,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;
@@ -942,7 +942,7 @@
                d.Add(FunctionAttributeKey.SetTemp, temp.ToString());
                Control.Ins.SendWriteCommand(device, d);
            };
            if (!device.online)
            //if (device.online)
            {
                arcBar.OnStopTrackingTouchEvent = (sender, e) =>
                {
@@ -1003,15 +1003,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")