wei
2021-07-09 068c68295cad1967f7aafb4e5e951260ef03d4ce
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -196,8 +196,10 @@
                Height = Application.GetRealWidth(40),
                UnSelectedImagePath = "FunctionIcon/AC/SweepIconNullOn.png",
            };
            FrameWhiteCentet1.AddChidren(btnSwing);
            if (device.GetAttribute(FunctionAttributeKey.Swing) != null)
            {
                FrameWhiteCentet1.AddChidren(btnSwing);
            }
            btnWindSpeed = new Button()
@@ -327,8 +329,7 @@
                    btnModeIcon.IsSelected = btnModeText.IsSelected = true;
                    device.SetAttrState(FunctionAttributeKey.Mode, m);
                    btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(m);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    //btnMode.UnSelectedImagePath = btnModeIcon.UnSelectedImagePath;
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.Mode, m);
                    Control.Ins.SendWriteCommand(device, d);
                    dialog.Close();
@@ -594,8 +595,8 @@
                {
                    Gravity = Gravity.CenterHorizontal,
                    Y = Application.GetRealHeight(334 + 80),
                    Width = Application.GetRealWidth(30),
                    Height = Application.GetRealWidth(30),
                    Width = Application.GetRealWidth(35),
                    Height = Application.GetRealWidth(35),
                    UnSelectedImagePath = "FunctionIcon/AC/More.png",
                };
                FrameWhiteCentet1.AddChidren(btnMore);
@@ -807,7 +808,7 @@
        {
            btnMinus.MouseUpEventHandler = (sender, e) =>
            {
                if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
                if (device.trait_on_off.state.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
                {
                    return;
                }
@@ -826,7 +827,7 @@
            };
            btnPlus.MouseUpEventHandler = (sender, e) =>
            {
                if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
                if (device.trait_on_off.state.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
                {
                    return;
                }
@@ -874,7 +875,7 @@
        {
            btnMode.MouseUpEventHandler = (sender, e) =>
            {
                if (device.trait_on_off.curValue.ToString() == "off")
                if (device.trait_on_off.state.ToString() == "off")
                {
                    return;
                }
@@ -883,7 +884,7 @@
            //扫风改变模式
            btnSwing.MouseUpEventHandler = (sender, e) =>
            {
                if (device.trait_on_off.curValue.ToString() == "off")
                if (device.trait_on_off.state.ToString() == "off")
                {
                    return;
                }
@@ -891,7 +892,7 @@
            };
            btnWindSpeed.MouseUpEventHandler = (sender, e) =>
            {
                if (device.trait_on_off.curValue.ToString() == "off")
                if (device.trait_on_off.state.ToString() == "off")
                {
                    return;
                }
@@ -901,8 +902,8 @@
            btnSwitch.MouseUpEventHandler = (sender, e) =>
            {
                btnSwitch.IsSelected = !btnSwitch.IsSelected;
                device.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                if (device.trait_on_off.curValue.ToString() == "on")
                device.trait_on_off.state = btnSwitch.IsSelected ? "on" : "off";
                if (device.trait_on_off.state.ToString() == "on")
                {
                    arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png";
                    btnSwitch.IsSelected = true;
@@ -915,7 +916,7 @@
                    arcBar.IsOffline = true;
                }
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.OnOff, device.trait_on_off.curValue.ToString());
                d.Add(FunctionAttributeKey.OnOff, device.trait_on_off.state.ToString());
                Control.Ins.SendWriteCommand(device, d);
            };
        }
@@ -929,15 +930,15 @@
        /// </summary>
        private void RefreshFormStatu()
        {
            Application.RunOnMainThread(() =>
            Application.RunOnMainThread((Action)(() =>
            {
                btnTemp.Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp)).ToString();
                btnTemp.Text = Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)).ToString();
                btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp))) + "°C";
                btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode));
                btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing));
                btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed));
                arcBar.Progress = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)));
                if (device.trait_on_off.curValue.ToString() == "on")
                if (device.trait_on_off.state.ToString() == "on")
                {
                    arcBar.IsOffline = false;
                    btnSwitch.IsSelected = true;
@@ -958,7 +959,7 @@
                    arcBar.IsClickable = false;
                    arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png";
                }
            });
            }));
        }
        #endregion