wxr
2022-03-11 b079d370b3c23751a5d200dc2d25f6c80977b4d4
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -358,6 +358,15 @@
                };
                EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                {
                    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);
@@ -485,6 +494,15 @@
                };
                EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                {
                    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);
@@ -600,6 +618,15 @@
                };
                EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                {
                    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);
@@ -787,6 +814,15 @@
                btn.MouseUpEventHandler = (sender, e) =>
                {
                    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);
@@ -841,6 +877,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.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
                {
                    return;
@@ -862,6 +907,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.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
                {
                    return;
@@ -879,6 +933,8 @@
                d.Add(FunctionAttributeKey.SetTemp, temp.ToString());
                Control.Ins.SendWriteCommand(device, d);
            };
            if (!device.online)
            {
            arcBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
                temp = arcBar.Progress;
@@ -903,7 +959,7 @@
            //    MainPage.BasePageView.ScrollEnabled = true;
            //};
        }
        }
        /// <summary>
        /// 控制模式事件
@@ -938,6 +994,15 @@
            btnSwitch.MouseUpEventHandler = (sender, e) =>
            {
                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")