From 2bbb1b72dbce5cf9bd4ac4a5b7488e3f18eaf929 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期六, 19 十二月 2020 18:37:38 +0800 Subject: [PATCH] 2020-12-19 1.IOS和Android网络切换,远程和本地控制切换优化。 2.IOS和Android后台回到前台,搜索网关,远程和本地控制切换优化. --- HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs old mode 100644 new mode 100755 index eb16fe4..de010b1 --- a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs @@ -26,13 +26,13 @@ updataTime = DateTime.Now; bodyView.arcBar.ProgressBarColor = bodyView.aC.trait_on_off.curValue.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; bodyView.btnTemp.Text = uAc.trait_temp.curValue.ToString(); - bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + uAc.indoorTemp + "掳C"; + 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; bodyView.btnSwitch.IsSelected = uAc.trait_on_off.curValue.ToString() == "on"; if (uAc.refreshTime.AddMilliseconds(1000) < DateTime.Now) { - bodyView.arcBar.Progress = Convert.ToInt32(uAc.trait_temp.curValue); + bodyView.arcBar.Progress = Convert.ToInt32(Convert.ToDouble(uAc.trait_temp.curValue)); } bodyView.arcBar.ProgressBarColor = uAc.trait_on_off.curValue.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; @@ -56,7 +56,6 @@ { btnFunctionName.Text = btnFunctionName_Out.Text = aC.name; btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = aC.GetRoomListName(); - aC.SaveFunctionData(true); }; } @@ -90,7 +89,7 @@ aC.trait_temp.curValue = temp; //Control.Send(CommandType_A.write, aC); System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); - d.Add("temp", temp.ToString()); + d.Add(FunctionAttributeKey.SetTemp, temp.ToString()); Control.Ins.SendWriteCommand(aC, d); }; btnPlus.MouseUpEventHandler = (sender, e) => @@ -105,7 +104,7 @@ btnTemp.Text = temp.ToString(); aC.trait_temp.curValue = temp; System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); - d.Add("temp", aC.trait_temp.curValue.ToString()); + d.Add(FunctionAttributeKey.SetTemp, aC.trait_temp.curValue.ToString()); Control.Ins.SendWriteCommand(aC, d); //aC.GetSendJObject @@ -116,7 +115,7 @@ btnTemp.Text = aC.trait_temp.curValue.ToString(); //Control.Send(CommandType_A.write, aC); System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); - d.Add("temp", aC.trait_temp.curValue.ToString()); + d.Add(FunctionAttributeKey.SetTemp, aC.trait_temp.curValue.ToString()); Control.Ins.SendWriteCommand(aC, d); }; arcBar.OnProgressChangedEvent = (sender, e) => @@ -153,7 +152,7 @@ //Control.Send(CommandType_A.write, aC); System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); - d.Add("on_off", aC.trait_on_off.curValue.ToString()); + d.Add(FunctionAttributeKey.OnOff, aC.trait_on_off.curValue.ToString()); Control.Ins.SendWriteCommand(aC, d); }; } @@ -174,7 +173,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>(); - d.Add("mode", aC.curModeIndex.ToString()); + d.Add(FunctionAttributeKey.Mode, curMode); Control.Ins.SendWriteCommand(aC, d); dialog.Close(); }; @@ -198,7 +197,7 @@ 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("fan", aC.curFanIndex.ToString()); + d.Add(FunctionAttributeKey.FanSpeed, curFan); Control.Ins.SendWriteCommand(aC, d); dialog.Close(); }; -- Gitblit v1.8.0