陈嘉乐
2021-01-27 122dc4312c72b2d2aaa50a2adf84165f5600b99a
HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs
@@ -36,9 +36,10 @@
                    bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(uAc.trait_IndoorTemp.curValue)) + "°C";
                    bodyView.btnMode.UnSelectedImagePath = uAc.curModeImage;
                    bodyView.btnWindSpeed.UnSelectedImagePath = uAc.curFanImage;
                    if(uAc.trait_on_off.curValue.ToString() == "on")
                    bodyView.arcBar.Progress = Convert.ToInt32(Convert.ToDouble(uAc.trait_temp.curValue));
                    if (uAc.trait_on_off.curValue.ToString() == "on")
                    {
                        bodyView.arcBar.IsOffline = true;
                        bodyView.arcBar.IsOffline = false;
                        bodyView.btnSwitch.IsSelected = true;
                        bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png";
                        if (uAc.trait_mode.curValue.ToString() == "fan")
@@ -52,7 +53,7 @@
                    }
                    else
                    {
                        bodyView.arcBar.IsOffline = false;
                        bodyView.arcBar.IsOffline = true;
                        bodyView.btnSwitch.IsSelected = false;
                        bodyView.arcBar.IsClickable = false;
                        bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png";
@@ -211,6 +212,7 @@
                btnMode.UnSelectedImagePath = aC.curModeImage;
                //Control.Send(CommandType_A.write, aC);
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                btnMode.UnSelectedImagePath = btn1.UnSelectedImagePath;
                d.Add(FunctionAttributeKey.Mode, curMode);
                Control.Ins.SendWriteCommand(aC, d);
                dialog.Close();
@@ -232,7 +234,7 @@
        /// </summary>
        void LoadEvent_ChangeFan(Dialog dialog, FrameLayout dialogView, Button btn1, Button btn2, string curFan)
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            EventHandler<MouseEventArgs> closeDialogEvent = (sender, e) =>
            {
                dialog.Close();
            };
@@ -241,15 +243,15 @@
                btn1.IsSelected = btn2.IsSelected = true;
                aC.trait_fan.curValue = curFan;
                btnWindSpeed.UnSelectedImagePath = aC.curFanImage;
                //Control.Send(CommandType_A.write, aC);
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.FanSpeed, curFan);
                Control.Ins.SendWriteCommand(aC, d);
                btnWindSpeed.UnSelectedImagePath = btn1.UnSelectedImagePath;
                dialog.Close();
            };
            btn1.MouseUpEventHandler = eventHandler1;
            btn2.MouseUpEventHandler = eventHandler1;
            dialogView.MouseUpEventHandler = eventHandler;
            dialogView.MouseUpEventHandler = closeDialogEvent;
        }
    }
}