From a40848272e33822f72a7fe0310f079717bf73f23 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期五, 18 十月 2024 16:21:39 +0800 Subject: [PATCH] 修复金茂科技系统,金茂光伏问题 --- HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs | 52 +++++++++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 25 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs index 5df9ec0..f7b65d4 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs @@ -104,7 +104,7 @@ var temp = (int)Convert.ToDouble(setTempTemp); if (temp <= 0) { - //榛樿鍊兼敼鎴�16,2022骞�06鏈�10鏃�10:03:19 鎴愮敨瑕佹眰鐨� + //榛樿鍊兼敼鎴�16 temp = 16; device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); } @@ -156,7 +156,7 @@ TextSize = CSS_FontSize.EmphasisFontSize_Secondary, IsBold = true, TextAlignment = TextAlignment.CenterLeft, - Text = "掳C", + Text = acFunction.GetTempUnitString(device), }; FrameWhiteCentet1.AddChidren(btnTempUint); @@ -166,7 +166,7 @@ Y = btnTemp.Bottom, Width = Application.GetRealWidth(120), Height = Application.GetRealHeight(30), - Text = Language.StringByID(StringId.Indoor) + " 20掳C", + Text = Language.StringByID(StringId.Indoor) + " 20" + acFunction.GetTempUnitString(device), TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextAlignment = TextAlignment.TopCenter, @@ -305,15 +305,18 @@ }; setTempBar.OnStopTrackingTouchEvent = (sender, e) => { temp = e; + Dictionary<string, string> d = new Dictionary<string, string>(); device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString()); if (setTempAttr.step == "0.5") { - e = e / 2; - btnTemp.Text = (setTempAttr.min + ((double)e)).ToString("0.0"); + double ex = (double)e / 2; + btnTemp.Text = (setTempAttr.min + ((double)ex)).ToString("0.0"); + d.Add(FunctionAttributeKey.SetTemp, (setTempAttr.min + ex).ToString()); } else { btnTemp.Text = (setTempAttr.min + e).ToString(); + d.Add(FunctionAttributeKey.SetTemp, (setTempAttr.min + e).ToString()); } #if __IOS__ @@ -323,8 +326,6 @@ #endif btnTempUint.X = btnTemp.Right; controlTime = DateTime.Now; - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add(FunctionAttributeKey.SetTemp, (setTempAttr.min + e).ToString()); Control.Ins.SendWriteCommand(device, d); }; @@ -445,7 +446,7 @@ d.Add(FunctionAttributeKey.Mode, m); Control.Ins.SendWriteCommand(device, d); dialog.Close(); - if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") + if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan" || device.GetAttrState(FunctionAttributeKey.Mode) == "dry") { setTempBar.IsClickable = false; @@ -997,16 +998,10 @@ if (device.trait_on_off.curValue.ToString() == "on") { btnSwitch.IsSelected = true; - //setTempBar.IsOffline = false; - //setTempBar.Enable = true; - //setTempBar.ProgressBarColor = CSS_Color.MainColor; } else { btnSwitch.IsBold = false; - //setTempBar.IsOffline = true; - //setTempBar.Enable = false; - //setTempBar.ProgressBarColor = CSS_Color.DividingLineColor; } System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, device.trait_on_off.curValue.ToString()); @@ -1034,7 +1029,9 @@ { //device = FunctionList.List.Functions.Find((obj) => obj.sid == device.sid); - btnIndoorTemp.Text = Language.StringByID(StringId.Indoor) + " " + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C"; + btnIndoorTemp.Text = Language.StringByID(StringId.Indoor) + " " + + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + + acFunction.GetTempUnitString(device); btnMode.SelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); btnSwing.SelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing)); btnWindSpeed.SelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed)); @@ -1066,18 +1063,19 @@ if (device.trait_on_off.curValue.ToString() == "on") { btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = true; - setTempBar.Enable = true; + //setTempBar.Enable = true; setTempBar.ProgressBarColor = CSS_Color.MainColor; btnSwitch.IsSelected = true; - if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") - { - setTempBar.IsClickable = false; - } - else - { - setTempBar.IsClickable = true; - } + //if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") + //{ + // setTempBar.IsClickable = false; + //} + //else + //{ + // setTempBar.IsClickable = true; + //} + } else { @@ -1089,11 +1087,15 @@ setTempBar.IsClickable = false; } - if (device.GetAttrState(FunctionAttributeKey.Mode) == "dry") + if ( device.GetAttrState(FunctionAttributeKey.Mode) == "fan") { setTempBar.IsOffline = true; setTempBar.IsClickable = false; + }else + { + setTempBar.IsOffline = false; + setTempBar.IsClickable = true; } } -- Gitblit v1.8.0