gxc
2020-02-28 66a9965c44ecc32a6696abca876ab9d1cd091584
ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
old mode 100755 new mode 100644
@@ -3,6 +3,7 @@
using ZigBee.Device;
using Shared.Phone.Device.CommonForm;
using Shared.Phone.UserView;
using Shared.Phone.Device.DeviceLogic;
namespace Shared.Phone.Device.AC
{
@@ -12,7 +13,7 @@
        /// <summary>
        /// The action.
        /// </summary>
        public Action action;
        public Action<DeviceUI, Common.Room> action;
        /// <summary>
        /// 收藏按钮
@@ -72,10 +73,6 @@
        /// </summary>
        private Button currentModeBtn;
        /// <summary>
        /// 当前温度
        /// </summary>
        private Button currentTemperatureBtn;
        /// <summary>
        /// 添加温度
        /// </summary>
        private Button addTemperatureBtn;
@@ -112,6 +109,19 @@
        /// 传过来的ac
        /// </summary>
        private ZigBee.Device.AC ac;
        /// <summary>
        /// mArcScaleSeekBar
        /// </summary>
        private ArcScaleSeekBar mArcScaleSeekBar = new ArcScaleSeekBar { };
        /// <summary>
        /// 清洁状态
        /// </summary>
        private LeftIconButtonRow cleanStatu;
        /// <summary>
        /// IsDrawerLockMode
        /// </summary>
        public bool IsDrawerLockMode;
        #endregion
        #region ◆ 接口___________________________
@@ -160,103 +170,102 @@
                                return;
                            }
                            deviceUI.CommonDevice.DeviceStatusReport = common.DeviceStatusReport;
                            var curTemp = (attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
                            switch (attriButeList[0].AttributeId)
                            foreach(var attList in attriButeList)
                            {
                                case 0:
                                    ac.currentLocalTemperature = curTemp;
                                    ac.LastDateTime = DateTime.Now;
                                    indoorTemperatureBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {ac.currentLocalTemperature} ℃";
                                    //currentTemperatureBtn.Text = $"{ac.currentLocalTemperature} ℃";
                                    break;
                                case 17:
                                    ac.currentCoolingSetpoint = curTemp;
                                    if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
                                    {
                                        currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} ℃";
                                    }
                                    ac.LastDateTime = DateTime.Now;
                                    break;
                                case 18:
                                    ac.currentHeatingSetpoint = curTemp;
                                    if (ac.currentSystemMode == 4)
                                    {
                                        currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} ℃";
                                    }
                                    ac.LastDateTime = DateTime.Now;
                                    break;
                                case 4096:
                                    ac.currentAutoSetpoint = curTemp;
                                    if (ac.currentSystemMode == 1)
                                    {
                                        currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} ℃";
                                    }
                                    ac.LastDateTime = DateTime.Now;
                                    break;
                                case 28:
                                    //此属性描述恒温设备正处于哪种模式
                                    //Off = 0  Auto = 1 Cool = 3 Heat = 4 FanOnly = 7  Dry = 8
                                    ac.currentSystemMode = attriButeList[0].AttriButeData;
                                    ac.LastDateTime = DateTime.Now;
                                    if (ac.currentSystemMode == 0)
                                    {
                                        switchBtn.IsSelected = false;
                                        modeBtn.IsSelected = false;
                                var curTemp = (attList.AttriButeData / 100 < ACControlBase.Temperature_High && attList.AttriButeData / 100 > ACControlBase.Temperature_Low) ? attList.AttriButeData / 100 : ACControlBase.Temperature_Default;
                                switch (attList.AttributeId)
                                {
                                    case 0:
                                        ac.currentLocalTemperature = curTemp;
                                        ac.LastDateTime = DateTime.Now;
                                        indoorTemperatureBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {ac.currentLocalTemperature} ℃";
                                        //currentTemperatureBtn.Text = $"{ac.currentLocalTemperature} ℃";
                                        break;
                                    case 17:
                                        ac.currentCoolingSetpoint = curTemp;
                                        if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
                                        {
                                            mArcScaleSeekBar.Progress = ac.currentCoolingSetpoint;
                                        }
                                        ac.LastDateTime = DateTime.Now;
                                        break;
                                    case 18:
                                        ac.currentHeatingSetpoint = curTemp;
                                        if (ac.currentSystemMode == 4)
                                        {
                                            mArcScaleSeekBar.Progress = ac.currentHeatingSetpoint;
                                        }
                                        ac.LastDateTime = DateTime.Now;
                                        break;
                                    case 4096:
                                        ac.currentAutoSetpoint = curTemp;
                                        if (ac.currentSystemMode == 1)
                                        {
                                            mArcScaleSeekBar.Progress = ac.currentAutoSetpoint;
                                        }
                                        ac.LastDateTime = DateTime.Now;
                                        break;
                                    case 28:
                                        //此属性描述恒温设备正处于哪种模式
                                        //Off = 0  Auto = 1 Cool = 3 Heat = 4 FanOnly = 7  Dry = 8
                                        ac.currentSystemMode = attList.AttriButeData;
                                        ac.LastDateTime = DateTime.Now;
                                        if (ac.currentSystemMode == 0)
                                        {
                                            switchBtn.IsSelected = false;
                                            modeBtn.IsSelected = false;
                                            fanModeBtn.IsSelected = false;
                                            FanSwingModeBtn.IsSelected = false;
                                            mArcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
                                        }
                                        else if (ac.currentSystemMode == 1 || ac.currentSystemMode == 3 || ac.currentSystemMode == 4 || ac.currentSystemMode == 7 || ac.currentSystemMode == 8)
                                        {
                                            switchBtn.IsSelected = true;
                                            modeBtn.IsSelected = true;
                                            fanModeBtn.IsSelected = true;
                                            FanSwingModeBtn.IsSelected = true;
                                            mArcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCArcScaleSeekBarStartColor, ZigbeeColor.Current.GXCArcScaleSeekBarEndColor);
                                        }
                                        modeBtn.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(ac.currentSystemMode);
                                        modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(ac.currentSystemMode);
                                        currentModeBtn.Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode);
                                        currentTemperatureBtn.Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} ℃";
                                        fanModeBtn.IsSelected = false;
                                        FanSwingModeBtn.IsSelected = false;
                                    }
                                    else if (ac.currentSystemMode == 1 || ac.currentSystemMode == 3 || ac.currentSystemMode == 4 || ac.currentSystemMode == 7 || ac.currentSystemMode == 8)
                                    {
                                        switchBtn.IsSelected = true;
                                        modeBtn.IsSelected = true;
                                        modeBtn.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(ac.currentSystemMode);
                                        modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(ac.currentSystemMode);
                                        currentModeBtn.Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode);
                                        currentTemperatureBtn.Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} ℃";
                                        fanModeBtn.IsSelected = true;
                                        FanSwingModeBtn.IsSelected = true;
                                    }
                                    break;
                                        mArcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(ac);
                                        mArcScaleSeekBar.IsClickable = ACControlBase.IsOpen(ac);
                                        break;
                                    case 4097:
                                        //过虑网清洗标志:42
                                        ac.CleanStatu = attList.AttriButeData == 42;
                                        cleanStatu.Visible = ac.CleanStatu;
                                        break;
                                }
                            }
                        }
                        if (common.DeviceStatusReport.CluterID == 514)
                        {
                            var attriButeList = common.DeviceStatusReport.AttriBute;
                            if (attriButeList == null || attriButeList.Count == 0)
                            {
                                return;
                            }
                            ac.DeviceStatusReport = common.DeviceStatusReport;
                            switch (attriButeList[0].AttributeId)
                            foreach(var attList in attriButeList)
                            {
                                case 0:
                                    //风扇当前的工作模式 1=Low 2=Medium 3=High
                                    ac.currentFanMode = attriButeList[0].AttriButeData;
                                    ac.LastDateTime = DateTime.Now;
                                    fanModeBtn.IsSelected = true;
                                    fanModeBtn.SelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanModeId(ac.currentFanMode);
                                    fanModeBtn.UnSelectedImagePath = ACControlBase.GetFanModeUnSelectedImagePathByFanModeId(ac.currentFanMode);
                                    break;
                                case 4096:
                                    //风扇当前的扫风模式
                                    ac.currentFanSwingMode = attriButeList[0].AttriButeData;
                                    ac.LastDateTime = DateTime.Now;
                                    FanSwingModeBtn.IsSelected = true;
                                    FanSwingModeBtn.SelectedImagePath = ACControlBase.GetFanSwingModeSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode);
                                    FanSwingModeBtn.UnSelectedImagePath = ACControlBase.GetFanSwingModeUnSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode);
                                    break;
                                switch (attList.AttributeId)
                                {
                                    case 0:
                                        //风扇当前的工作模式 1=Low 2=Medium 3=High
                                        ac.currentFanMode = attList.AttriButeData;
                                        ac.LastDateTime = DateTime.Now;
                                        fanModeBtn.IsSelected = true;
                                        fanModeBtn.SelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanModeId(ac.currentFanMode);
                                        fanModeBtn.UnSelectedImagePath = ACControlBase.GetFanModeUnSelectedImagePathByFanModeId(ac.currentFanMode);
                                        break;
                                    case 4096:
                                        //风扇当前的扫风模式
                                        ac.currentFanSwingMode = attList.AttriButeData;
                                        ac.LastDateTime = DateTime.Now;
                                        FanSwingModeBtn.IsSelected = true;
                                        FanSwingModeBtn.SelectedImagePath = ACControlBase.GetFanSwingModeSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode);
                                        FanSwingModeBtn.UnSelectedImagePath = ACControlBase.GetFanSwingModeUnSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode);
                                        break;
                                }
                            }
                        }
                        //***新改 * **设备状态上报中,当CluterID = 3,证明设备在线,直接标记
@@ -331,6 +340,8 @@
        {
            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
            ZigBee.Device.ZbGateway.StatusList.Add(this);
            HomePage.Instance.ScrollEnabled = false;
        }
        #endregion
@@ -343,9 +354,14 @@
        public override void RemoveFromParent()
        {
            ZigBee.Device.ZbGateway.StatusList.Remove(this);
            //action();
            //action = null;
            action(device, room);
            action = null;
            RemoveUpdateControlDeviceStatuAction();
            HomePage.Instance.ScrollEnabled = true;
            if (IsDrawerLockMode)
            {
                CommonPage.Instance.IsDrawerLockMode = false;
            }
            base.RemoveFromParent();
        }
@@ -377,14 +393,7 @@
                //发送读取状态命令
                UserView.UserHomeView.ReadStatus(ac, () =>
                {
                    ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
                    ac.ReadLocalTemperature();
                    ac.ReadCoolingSetpoint();
                    ac.ReadHeatingSetpoint();
                    ac.ReadAutoSetpoint();
                    ac.ReadFanMode();
                    ac.ReadSystemMode();
                    ac.ReadSystemFansSwingMode();
                    ReadDeviceAttributeLogic.Instance.SendACStatuComand(device.CommonDevice);
                });
            }
            else
@@ -392,19 +401,11 @@
                //防止短时间内多次读取设备状态
                if ((DateTime.Now - ac.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
                {
                    ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
                    ac.ReadLocalTemperature();
                    ac.ReadCoolingSetpoint();
                    ac.ReadHeatingSetpoint();
                    ac.ReadAutoSetpoint();
                    ac.ReadFanMode();
                    ac.ReadSystemMode();
                    ac.ReadSystemFansSwingMode();
                    ReadDeviceAttributeLogic.Instance.SendACStatuComand(device.CommonDevice);
                }
            }
            var de = Shared.Common.Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
            if (de == null)
            if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName)==false)
            {
                collectionBtn.IsSelected = false;
            }
@@ -413,9 +414,7 @@
                collectionBtn.IsSelected = true;
            }
            BindEvent();
        }
        #endregion
@@ -435,16 +434,6 @@
                RemoveFromParent();
            };
            var sharedBtn = new Button
            {
                X = Application.GetRealWidth(850),
                Width = Application.GetMinReal(69),
                Height = Application.GetMinReal(69),
                Gravity = Gravity.CenterVertical,
                UnSelectedImagePath = "Item/Shared.png"
            };
            top.topView.AddChidren(sharedBtn);
            var moreBtn = new Button
            {
                X = Application.GetRealWidth(953),
@@ -456,7 +445,6 @@
            top.topView.AddChidren(moreBtn);
            moreBtn.MouseUpEventHandler += More;
        }
        /// <summary>
        /// AddBodyView
@@ -482,6 +470,11 @@
            };
            bodyFrameLayout.AddChidren(itemView);
            cleanStatu = new LeftIconButtonRow(400, 80, 0, 20);
            itemView.AddChidren(cleanStatu);
            cleanStatu.Init("AC/AC_TIP.png", "AC/AC_TIP.png", Language.StringByID(R.MyInternationalizationString.NeedCleanAC), false);
            cleanStatu.Visible = false;
            collectionBtn = new Button()
            {
                X = Application.GetRealWidth(850),
@@ -496,12 +489,13 @@
            var deviceNameBtn = new Button()
            {
                Y = Application.GetRealHeight(184),
                Width = Application.GetRealWidth(500),
                Width = Application.GetRealWidth(600),
                Height = Application.GetRealHeight(60),
                Gravity = Gravity.CenterHorizontal,
                Text = device.CommonDevice.DeviceEpointName,
                Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextSize = 15
                TextSize = 15,
                IsBold=true
            };
            itemView.AddChidren(deviceNameBtn);
@@ -512,78 +506,103 @@
                Height = Application.GetRealHeight(60),
                Gravity = Gravity.CenterHorizontal,
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {ac.currentLocalTemperature} ℃"
                Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {ac.currentLocalTemperature} ℃",
                TextSize=10
            };
            itemView.AddChidren(indoorTemperatureBtn);
            var controlBG = new FrameLayout()
            var mArcScaleSeekBarFL = new FrameLayout
            {
                Y = Application.GetRealHeight(412),
                Height = Application.GetMinRealAverage(547),
                Width = Application.GetMinRealAverage(671),
                Gravity = Gravity.CenterHorizontal,
                BackgroundImagePath = "AC/Group.png"
            };
            itemView.AddChidren(controlBG);
            var controlBG2 = new Button()
            {
                Y = Application.GetRealHeight(873),
                Height = Application.GetMinRealAverage(121),
                Width = Application.GetMinRealAverage(351),
                UnSelectedImagePath = "AC/Path.png",
                Height = Application.GetMinRealAverage(671),
                Gravity = Gravity.CenterHorizontal
            };
            itemView.AddChidren(controlBG2);
            //当前模式
            itemView.AddChidren(mArcScaleSeekBarFL);
            mArcScaleSeekBar = new ArcScaleSeekBar
            {
                Width = Application.GetMinRealAverage(671),
                Height = Application.GetMinRealAverage(671),
                Gravity = Gravity.CenterHorizontal,
                MinValue = ACControlBase.Temperature_Low,
                MaxValue = ACControlBase.Temperature_High,
                Progress = ACControlBase.GetCurrentModeTemperature(ac),
                IsClickable = ACControlBase.IsOpen(ac),
                ProgressBarUnitSring = string.Empty
            };
            mArcScaleSeekBarFL.AddChidren(mArcScaleSeekBar);
            if(ACControlBase.IsOpen(ac))
            {
                mArcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCArcScaleSeekBarStartColor, ZigbeeColor.Current.GXCArcScaleSeekBarEndColor);
            }
            else
            {
                mArcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
            }
            mArcScaleSeekBar.OnStopTrackingTouchEvent += (sender, e) =>
            {
                if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
                {
                    ac.currentCoolingSetpoint = e;
                    ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100);
                }
                else if (ac.currentSystemMode == 4)
                {
                    ac.currentHeatingSetpoint = e;
                    ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100);
                }
                else if (ac.currentSystemMode == 1)
                {
                    ac.currentAutoSetpoint = e;
                    ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint * 100);
                }
            };
            currentModeBtn = new Button()
            {
                Y = Application.GetRealHeight(187),
                Height = Application.GetRealHeight(80),
                Y = Application.GetMinRealAverage(187),
                Height = Application.GetRealHeight(50),
                Width = Application.GetRealWidth(200),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Gravity = Gravity.CenterHorizontal,
                Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode)
                Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode),
                TextSize = 12
            };
            controlBG.AddChidren(currentModeBtn);
            //降低温度
            mArcScaleSeekBarFL.AddChidren(currentModeBtn);
            reduceTemperatureBtn = new Button()
            {
                X = Application.GetRealWidth(112),
                Y = Application.GetRealHeight(268),
                X = Application.GetMinRealAverage(132),
                Y = Application.GetMinRealAverage(268),
                Width = Application.GetMinRealAverage(80),
                Height = Application.GetMinRealAverage(80),
                UnSelectedImagePath = "AC/Reduce.png"
            };
            controlBG.AddChidren(reduceTemperatureBtn);
            mArcScaleSeekBarFL.AddChidren(reduceTemperatureBtn);
            //温度
            currentTemperatureBtn = new Button()
            {
                //X = Application.GetRealWidth(239),
                Y = Application.GetRealHeight(248),
                Width = Application.GetRealWidth(180),
                Height = Application.GetRealHeight(100),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextSize = 15,
                Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} °C",
                Gravity = Gravity.CenterHorizontal
            };
            controlBG.AddChidren(currentTemperatureBtn);
            //添加温度
            addTemperatureBtn = new Button()
            {
                X = Application.GetRealWidth(472),
                Y = Application.GetRealHeight(268),
                X = Application.GetMinRealAverage(452),
                Y = Application.GetMinRealAverage(268),
                Width = Application.GetMinRealAverage(80),
                Height = Application.GetMinRealAverage(80),
                UnSelectedImagePath = "AC/Add.png"
            };
            controlBG.AddChidren(addTemperatureBtn);
            mArcScaleSeekBarFL.AddChidren(addTemperatureBtn);
            //扫风
            var uintBtn = new Button
            {
                Y = Application.GetMinRealAverage(369),
                Height = Application.GetRealHeight(60),
                Width = Application.GetRealWidth(100),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Gravity = Gravity.CenterHorizontal,
                Text = "℃",
                TextSize = 18
            };
            mArcScaleSeekBarFL.AddChidren(uintBtn);
            FanSwingModeBtn = new Button()
            {
                X = Application.GetRealWidth(156),
@@ -594,9 +613,7 @@
                SelectedImagePath = ACControlBase.GetFanSwingModeSelectedImagePathByFanSwingModeId(ac.currentFanSwingMode),
                IsSelected = ACControlBase.IsOpen(ac)
            };
            itemView.AddChidren(FanSwingModeBtn);
            //模式
            modeBtn = new Button()
            {
                X = Application.GetRealWidth(346),
@@ -609,7 +626,6 @@
            };
            itemView.AddChidren(modeBtn);
            //开关
            switchBtn = new Button()
            {
                X = Application.GetRealWidth(536),
@@ -622,7 +638,6 @@
            };
            itemView.AddChidren(switchBtn);
            //风速
            fanModeBtn = new Button()
            {
                X = Application.GetRealWidth(729),
@@ -634,6 +649,18 @@
                IsSelected = ACControlBase.IsOpen(ac)
            };
            itemView.AddChidren(fanModeBtn);
            if (ac.UseSwingFunction)
            {
                itemView.AddChidren(FanSwingModeBtn);
            }
            else
            {
                modeBtn.X = Application.GetRealWidth(207);
                switchBtn.X = Application.GetRealWidth(444);
                fanModeBtn.X = Application.GetRealWidth(677);
            }
            var roomBG = new Button
            {
@@ -670,7 +697,8 @@
                Height = Application.GetRealHeight(50),
                Text = room.Name,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                TextSize=12
            };
            itemView.AddChidren(roomName);
        }
@@ -705,12 +733,14 @@
        private void Switch_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            switchBtn.IsSelected = !switchBtn.IsSelected;
            mArcScaleSeekBar.IsClickable = switchBtn.IsSelected;
            if (switchBtn.IsSelected == true)
            {
                ac.Open();
                modeBtn.IsSelected = true;
                fanModeBtn.IsSelected = true;
                FanSwingModeBtn.IsSelected = true;
                mArcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCArcScaleSeekBarStartColor, ZigbeeColor.Current.GXCArcScaleSeekBarEndColor);
            }
            else
            {
@@ -718,6 +748,7 @@
                modeBtn.IsSelected = false;
                fanModeBtn.IsSelected = false;
                FanSwingModeBtn.IsSelected = false;
                mArcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
            }
        }
@@ -755,14 +786,14 @@
            };
            closeBGview.AddChidren(changeFanModeBG);
            var changeFanModeFL = new FrameLayout()
            var changeFanModeFL = new VerticalScrolViewLayout()
            {
                X = Application.GetRealWidth(600),
                Y = Application.GetRealHeight(750),
                Height = Application.GetRealHeight(600),
                Width = Application.GetRealWidth(fanItem_Width),
                Radius = CommonPage.BigFormRadius,
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                ScrollEnabled=false,
                VerticalScrollBarEnabled=false
            };
            closeBGview.AddChidren(changeFanModeFL);
@@ -773,62 +804,47 @@
                Height = Application.GetRealHeight(fanItem_Height),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextID = R.MyInternationalizationString.SelectFanMode,
                TextAlignment = TextAlignment.CenterLeft
                TextAlignment = TextAlignment.CenterLeft,
                TextSize=14,
                IsBold=true
            };
            changeFanModeFL.AddChidren(changeFanBtn);
            var fan_Low = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = changeFanBtn.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanMode.Low
            };
            changeFanModeFL.AddChidren(fan_Low);
            var fan_Low = new LeftIconButtonRow();
            fan_Low.Tag = ZigBee.Device.AC.FanMode.Low;
            fan_Low.Init("AC/Fan_Low.png", "AC/Fan_LowSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Low));
            fan_Low.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_FanModel);
            changeFanModeFL.AddChidren(fan_Low);
            var fan_Middle = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = fan_Low.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanMode.Medium
            };
            changeFanModeFL.AddChidren(fan_Middle);
            var fan_Middle = new LeftIconButtonRow();
            fan_Middle.Tag = ZigBee.Device.AC.FanMode.Medium;
            fan_Middle.Init("AC/Fan_Middle.png", "AC/Fan_MiddleSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Middle));
            fan_Middle.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_FanModel);
            changeFanModeFL.AddChidren(fan_Middle);
            var fan_Height = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = fan_Middle.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanMode.High
            };
            changeFanModeFL.AddChidren(fan_Height);
            var fan_Height = new LeftIconButtonRow();
            fan_Height.Tag = ZigBee.Device.AC.FanMode.High;
            fan_Height.Init("AC/Fan_Height.png", "AC/Fan_HeightSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Height), false);
            fan_Height.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_FanModel);
            changeFanModeFL.AddChidren(fan_Height);
            fan_Low.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Low.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Middle.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Middle.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Height.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Height.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Low.ButtonClickEvent += ChangeFan_MouseUpEvent;
            fan_Middle.ButtonClickEvent += ChangeFan_MouseUpEvent;
            fan_Height.ButtonClickEvent += ChangeFan_MouseUpEvent;
            if (ACControlBase.IsOpen(ac))
            {
                if (ac.currentFanMode == 1)
                {
                    fan_Low.SetSelectedStatu();
                    fan_Low.IsSelected=true;
                }
                else if (ac.currentFanMode == 2)
                {
                    fan_Middle.SetSelectedStatu();
                    fan_Middle.IsSelected=true;
                }
                else
                {
                    fan_Height.SetSelectedStatu();
                    fan_Height.IsSelected=true;
                }
            }
        }
@@ -840,7 +856,7 @@
        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
        private void ChangeFan_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            var tag = (sender as Button).Tag.ToString();
            var tag = (sender as LeftIconButtonRow).Tag.ToString();
            ZigBee.Device.AC.FanMode mode = ZigBee.Device.AC.FanMode.Low;
            if (tag == "Low")
            {
@@ -888,6 +904,12 @@
        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
        private void ShowChangeMode_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            if (HadSupportModel() == false)
            {
                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.AC_Model_None));
                return;
            }
            int modeItem_X = 80;
            int modeItem_Height = 150;
            int modeItem_Width = 449;
@@ -911,15 +933,14 @@
            };
            closeBGview.AddChidren(changeModeBG);
            var changeModeFL = new FrameLayout()
            var changeModeFL = new VerticalScrolViewLayout()
            {
                X = Application.GetRealWidth(230),
                Y = Application.GetRealHeight(450),
                Height = Application.GetRealHeight(900),
                Width = Application.GetRealWidth(modeItem_Width),
                Radius = CommonPage.BigFormRadius,
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                //BackgroundIagePath="AC/SelectedModeBG.png"
                ScrollEnabled = false,
                VerticalScrollBarEnabled = false
            };
            closeBGview.AddChidren(changeModeFL);
@@ -929,97 +950,86 @@
                Width = Application.GetRealWidth(modeItem_Width - modeItem_X),
                Height = Application.GetRealHeight(modeItem_Height),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextID = R.MyInternationalizationString.SelectFanMode,
                TextAlignment = TextAlignment.CenterLeft
                TextID = R.MyInternationalizationString.SelectMode,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 14,
                IsBold = true
            };
            changeModeFL.AddChidren(changeModeBtn);
            var mode_Auto = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = changeModeBtn.Bottom,
                Width = Application.GetRealWidth(modeItem_Width),
                Height = Application.GetRealHeight(modeItem_Height),
                Tag = ZigBee.Device.AC.AcMode.Auto
            };
            changeModeFL.AddChidren(mode_Auto);
            var mode_Auto = new LeftIconButtonRow();
            mode_Auto.Tag = ZigBee.Device.AC.AcMode.Auto;
            mode_Auto.Init("AC/Mode_Auto.png", "AC/Mode_AutoSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Auto));
            var mode_Cool = new CommonForm.ACLeftIconButtonRowLayout()
            mode_Auto.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCTextBlackColor);
            if (ac.listSupportMode[4] == 1)
            {
                Y = mode_Auto.Bottom,
                Width = Application.GetRealWidth(modeItem_Width),
                Height = Application.GetRealHeight(modeItem_Height),
                Tag = ZigBee.Device.AC.AcMode.Cool
            };
            changeModeFL.AddChidren(mode_Cool);
                changeModeFL.AddChidren(mode_Auto);
            }
            var mode_Cool = new LeftIconButtonRow();
            mode_Cool.Tag = ZigBee.Device.AC.AcMode.Cool;
            mode_Cool.Init("AC/Mode_Cool.png", "AC/Mode_CoolSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Cool));
            var mode_Heat = new CommonForm.ACLeftIconButtonRowLayout()
            mode_Cool.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_Cool);
            if (ac.listSupportMode[0] == 1)
            {
                Y = mode_Cool.Bottom,
                Width = Application.GetRealWidth(modeItem_Width),
                Height = Application.GetRealHeight(modeItem_Height),
                Tag = ZigBee.Device.AC.AcMode.Heat
            };
            changeModeFL.AddChidren(mode_Heat);
                changeModeFL.AddChidren(mode_Cool);
            }
            var mode_Heat = new LeftIconButtonRow();
            mode_Heat.Tag = ZigBee.Device.AC.AcMode.Heat;
            mode_Heat.Init("AC/Mode_Heat.png", "AC/Mode_HeatSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Heat));
            var mode_Dry = new CommonForm.ACLeftIconButtonRowLayout()
            mode_Heat.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_Heat);
            if (ac.listSupportMode[1] == 1)
            {
                Y = mode_Heat.Bottom,
                Width = Application.GetRealWidth(modeItem_Width),
                Height = Application.GetRealHeight(modeItem_Height),
                Tag = ZigBee.Device.AC.AcMode.Dry
            };
            changeModeFL.AddChidren(mode_Dry);
                changeModeFL.AddChidren(mode_Heat);
            }
            var mode_Dry = new LeftIconButtonRow();
            mode_Dry.Tag = ZigBee.Device.AC.AcMode.Dry;
            mode_Dry.Init("AC/Mode_Dry.png", "AC/Mode_DrySelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Dry));
            var mode_Fan = new CommonForm.ACLeftIconButtonRowLayout()
            mode_Dry.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_Dry);
            if (ac.listSupportMode[3] == 1)
            {
                Y = mode_Dry.Bottom,
                Width = Application.GetRealWidth(modeItem_Width),
                Height = Application.GetRealHeight(modeItem_Height),
                Tag = ZigBee.Device.AC.AcMode.FanOnly
            };
            changeModeFL.AddChidren(mode_Fan);
                changeModeFL.AddChidren(mode_Dry);
            }
            var mode_Fan = new LeftIconButtonRow();
            mode_Fan.Tag = ZigBee.Device.AC.AcMode.FanOnly;
            mode_Fan.Init("AC/Mode_Fan.png", "AC/Mode_FanSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_FanOnly), false);
            mode_Fan.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_Fan);
            if (ac.listSupportMode[2] == 1)
            {
                changeModeFL.AddChidren(mode_Fan);
            }
            mode_Auto.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Auto.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Cool.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Cool.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Heat.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Heat.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Dry.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Dry.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Fan.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Fan.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Auto.ButtonClickEvent += ChangeMode_MouseUpEvent;
            mode_Cool.ButtonClickEvent += ChangeMode_MouseUpEvent;
            mode_Heat.ButtonClickEvent += ChangeMode_MouseUpEvent;
            mode_Dry.ButtonClickEvent += ChangeMode_MouseUpEvent;
            mode_Fan.ButtonClickEvent += ChangeMode_MouseUpEvent;
            if (ACControlBase.IsOpen(ac))
            {
                if (ac.currentSystemMode == 1)
                {
                    mode_Auto.SetSelectedStatu();
                    mode_Auto.IsSelected = true;
                }
                else if (ac.currentSystemMode == 3)
                {
                    mode_Cool.SetSelectedStatu();
                    mode_Cool.IsSelected = true;
                }
                else if (ac.currentSystemMode == 4)
                {
                    mode_Heat.SetSelectedStatu();
                    mode_Heat.IsSelected = true;
                }
                else if (ac.currentSystemMode == 8)
                {
                    mode_Dry.SetSelectedStatu();
                    mode_Dry.IsSelected = true;
                }
                else if (ac.currentSystemMode == 7)
                {
                    mode_Fan.SetSelectedStatu();
                    mode_Fan.IsSelected = true;
                }
            }
        }
@@ -1031,7 +1041,7 @@
        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
        private void ChangeMode_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            var tag = (sender as Button).Tag.ToString();
            var tag = (sender as LeftIconButtonRow).Tag.ToString();
            ZigBee.Device.AC.AcMode mode = ZigBee.Device.AC.AcMode.Cool;
            if (tag == "Auto")
@@ -1075,15 +1085,31 @@
            modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByMode(acMode);
            currentModeBtn.Text = ACControlBase.GetModeNameByMode(acMode);
            ac.currentSystemMode = (int)acMode;
            currentTemperatureBtn.Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} °C";
            mArcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(ac);
            ac.SetSystemModeAsync(acMode);
        }
        /// <summary>
        /// 是否配置了模式
        /// </summary>
        /// <returns></returns>
        private bool HadSupportModel()
        {
            bool hadMode = false;
            foreach (var m in ac.listSupportMode)
            {
                if (m == 1)
                {
                    hadMode = true;
                    break;
                }
            }
            return hadMode;
        }
        #endregion
        #region ◆ 切换扫风___________________________
        #region ◆ 切换扫风______________________
        /// <summary>
@@ -1116,14 +1142,14 @@
            };
            closeBGview.AddChidren(changeFanModeBG);
            var changeFanModeFL = new FrameLayout()
            var changeFanModeFL = new VerticalScrolViewLayout()
            {
                X = Application.GetRealWidth(35),
                Y = Application.GetRealHeight(297),
                Height = Application.GetRealHeight(1050),
                Width = Application.GetRealWidth(fanItem_Width),
                Radius = CommonPage.BigFormRadius,
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                VerticalScrollBarEnabled = false,
                ScrollEnabled = false
            };
            closeBGview.AddChidren(changeFanModeFL);
@@ -1134,114 +1160,80 @@
                Height = Application.GetRealHeight(fanItem_Height),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextID = R.MyInternationalizationString.SelectSwing,
                TextAlignment = TextAlignment.CenterLeft
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 14,
                IsBold = true
            };
            changeFanModeFL.AddChidren(changeFanBtn);
            var swing_First = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = changeFanBtn.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.First
            };
            changeFanModeFL.AddChidren(swing_First);
            var swing_First = new LeftIconButtonRow { };
            swing_First.Tag = ZigBee.Device.AC.FanSwingMode.First;
            swing_First.Init("AC/Swing_1.png", "AC/Swing_1Selected.png", Language.StringByID(R.MyInternationalizationString.Swing_First));
            swing_First.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_First);
            var swing_Second = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = swing_First.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.Second
            };
            changeFanModeFL.AddChidren(swing_Second);
            var swing_Second = new LeftIconButtonRow();
            swing_Second.Tag = ZigBee.Device.AC.FanSwingMode.Second;
            swing_Second.Init("AC/Swing_2.png", "AC/Swing_2Selected.png", Language.StringByID(R.MyInternationalizationString.Swing_Second));
            swing_Second.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_Second);
            var swing_Thrid = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = swing_Second.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.Thrid
            };
            changeFanModeFL.AddChidren(swing_Thrid);
            var swing_Thrid = new LeftIconButtonRow();
            swing_Thrid.Tag = ZigBee.Device.AC.FanSwingMode.Thrid;
            swing_Thrid.Init("AC/Swing_3.png", "AC/Swing_3Selected.png", Language.StringByID(R.MyInternationalizationString.Swing_Thrid));
            swing_Thrid.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_Thrid);
            var swing_Fourth = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = swing_Thrid.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.Fourth
            };
            changeFanModeFL.AddChidren(swing_Fourth);
            var swing_Fourth = new LeftIconButtonRow();
            swing_Fourth.Tag = ZigBee.Device.AC.FanSwingMode.Fourth;
            swing_Fourth.Init("AC/Swing_4.png", "AC/Swing_4Selected.png", Language.StringByID(R.MyInternationalizationString.Swing_Fourth));
            swing_Fourth.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_Fourth);
            var swing_Fifth = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = swing_Fourth.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.Fifth
            };
            changeFanModeFL.AddChidren(swing_Fifth);
            var swing_Fifth = new LeftIconButtonRow();
            swing_Fifth.Tag = ZigBee.Device.AC.FanSwingMode.Fifth;
            swing_Fifth.Init("AC/Swing_5.png", "AC/Swing_5Selected.png", Language.StringByID(R.MyInternationalizationString.Swing_Fifth));
            swing_Fifth.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_Fifth);
            var swing_Auto = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = swing_Fifth.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.Auto
            };
            var swing_Auto = new LeftIconButtonRow();
            swing_Auto.Tag = ZigBee.Device.AC.FanSwingMode.Auto;
            swing_Auto.Init("AC/Swing_Auto.png", "AC/Swing_AutoSelected.png", Language.StringByID(R.MyInternationalizationString.Swing_Auto), false);
            swing_Auto.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_Auto);
            swing_Auto.Init("AC/Swing_Auto.png", "AC/Swing_AutoSelected.png", Language.StringByID(R.MyInternationalizationString.Swing_Auto),false);
            swing_First.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_First.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Second.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Second.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Thrid.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Thrid.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Fourth.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Fourth.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Fifth.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Fifth.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Auto.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Auto.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_First.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            swing_Second.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            swing_Thrid.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            swing_Fourth.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            swing_Fifth.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            swing_Auto.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            if (ACControlBase.IsOpen(ac))
            {
                if (ac.currentFanSwingMode == 0)
                {
                    swing_First.SetSelectedStatu();
                    swing_First.IsSelected = true;
                }
                else if (ac.currentFanSwingMode == 1)
                {
                    swing_Second.SetSelectedStatu();
                    swing_Second.IsSelected = true;
                }
                else if (ac.currentFanSwingMode == 2)
                {
                    swing_Thrid.SetSelectedStatu();
                    swing_Thrid.IsSelected = true;
                }
                else if (ac.currentFanSwingMode == 3)
                {
                    swing_Fourth.SetSelectedStatu();
                    swing_Fourth.IsSelected = true;
                }
                else if (ac.currentFanSwingMode == 4)
                {
                    swing_Fifth.SetSelectedStatu();
                    swing_Fifth.IsSelected = true;
                }
                else if (ac.currentFanSwingMode == 7)
                {
                    swing_Auto.SetSelectedStatu();
                    swing_Auto.IsSelected = true;
                }
            }
        }
@@ -1253,7 +1245,7 @@
        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
        private void ChangeFanSwing_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            var tag = (sender as Button).Tag.ToString();
            var tag = (sender as LeftIconButtonRow).Tag.ToString();
            ZigBee.Device.AC.FanSwingMode mode = ZigBee.Device.AC.FanSwingMode.Auto;
            if (tag == "First")
            {
@@ -1275,7 +1267,6 @@
            {
                mode = ZigBee.Device.AC.FanSwingMode.Fifth;
            }
            ChangeFanSwing(mode);
        }
@@ -1316,7 +1307,6 @@
                ACControlBase.ShowACIsCloseTip();
                return;
            }
            //cool  //dry
            if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
            {
                if (ac.currentCoolingSetpoint >= ACControlBase.Temperature_High)
@@ -1325,9 +1315,8 @@
                }
                ac.currentCoolingSetpoint += 1;
                ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100);
                currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} °C";
                mArcScaleSeekBar.Progress = ac.currentCoolingSetpoint;
            }
            //heat
            else if (ac.currentSystemMode == 4)
            {
                if (ac.currentHeatingSetpoint >= ACControlBase.Temperature_High)
@@ -1336,9 +1325,8 @@
                }
                ac.currentHeatingSetpoint += 1;
                ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100);
                currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} °C";
                mArcScaleSeekBar.Progress = ac.currentHeatingSetpoint;
            }
            //auto
            else if (ac.currentSystemMode == 1)
            {
                if (ac.currentAutoSetpoint >= ACControlBase.Temperature_High)
@@ -1347,10 +1335,8 @@
                }
                ac.currentAutoSetpoint += 1;
                ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint * 100);
                currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} °C";
                mArcScaleSeekBar.Progress = ac.currentAutoSetpoint;
            }
        }
        #endregion
@@ -1369,7 +1355,6 @@
                ACControlBase.ShowACIsCloseTip();
                return;
            }
            //cool //dry
            if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
            {
                if (ac.currentCoolingSetpoint <= ACControlBase.Temperature_Low)
@@ -1378,10 +1363,8 @@
                }
                ac.currentCoolingSetpoint -= 1;
                ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100);
                currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} °C";
                mArcScaleSeekBar.Progress = ac.currentCoolingSetpoint;
            }
            //heat
            else if (ac.currentSystemMode == 4)
            {
                if (ac.currentHeatingSetpoint <= ACControlBase.Temperature_Low)
@@ -1390,10 +1373,8 @@
                }
                ac.currentHeatingSetpoint -= 1;
                ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100);
                currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} °C";
                mArcScaleSeekBar.Progress = ac.currentHeatingSetpoint;
            }
            //auto
            else if (ac.currentSystemMode == 1)
            {
                if (ac.currentAutoSetpoint <= ACControlBase.Temperature_Low)
@@ -1402,15 +1383,11 @@
                }
                ac.currentAutoSetpoint -= 1;
                ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint * 100);
                currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} °C";
                mArcScaleSeekBar.Progress = ac.currentAutoSetpoint;
            }
        }
        #endregion
        #region ◆ 控制反馈_________________________
@@ -1442,7 +1419,6 @@
        /// </summary>
        private void RemoveUpdateControlDeviceStatuAction()
        {
            //移除action
            if (zbGateway != null)
            {
                zbGateway.ReportAction -= UpdateDeviceControllStatu;
@@ -1464,9 +1440,9 @@
            UserView.HomePage.Instance.AddChidren(detailInfo);
            UserView.HomePage.Instance.PageIndex += 1;
            detailInfo.Show(device, room);
            detailInfo.action = () =>
            detailInfo.EditAction += (curDev, curRoom) =>
            {
                Show(device, room);
                Show(curDev, curRoom);
            };
        }
@@ -1481,7 +1457,6 @@
        /// <param name="e">E.</param>
        private void Collection(object sender, MouseEventArgs e)
        {
            //collection
            if (collectionBtn.IsSelected)
            {
                Shared.Common.Room.Lists[0].DeleteDevice(device.FileName);
@@ -1506,7 +1481,6 @@
        private void BackToRoomHandler(object sender, MouseEventArgs mouseEventArgs)
        {
            //backToRoom
        }
        #endregion