From 452e8cef1c740d18ee398be6971d9952e41dbd4a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 12 四月 2023 16:11:50 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs | 83 ++++++++++++++++++++++-------------------
1 files changed, 44 insertions(+), 39 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
index 98e5278..6669399 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
@@ -27,7 +27,7 @@
public static void UpdateStatus(Function temp)
{
- if(bodyView == null)
+ if(bodyView == null || bodyView.function.sid != temp.sid)
{
return;
}
@@ -43,11 +43,12 @@
if (setTempValue != 0)
bodyView.btnSetTempValues.Text = setTempValue.ToString();
- bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
+ //bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
//int progress = 0;
//int.TryParse(temp.GetAttrState(AcstSub_AttrEnum.set_temp.ToString()), out progress);
- bodyView.tempBar.Progress = setTempValue - 16;
+ if (bodyView.tempBar.Progress != setTempValue - 16)
+ bodyView.tempBar.Progress = setTempValue - 16;
if(temp.trait_on_off.curValue.ToString() == "on")
{
bodyView.btnPowerControl.IsSelected = true;
@@ -118,69 +119,71 @@
var tempValuesView = new FrameLayout()
{
X = Application.GetRealWidth(21),
- Y = Application.GetRealWidth(17),
+ Y = Application.GetRealWidth(22),
Width = Application.GetRealWidth(130),
Height = Application.GetRealWidth(132),
};
tempHumiView.AddChidren(tempValuesView);
btnTempValues = new Button()
{
- Y = Application.GetRealWidth(45),
- Height = Application.GetRealWidth(35),
+ Y = Application.GetRealWidth(38),
+ Height = Application.GetRealWidth(66),
IsBold = true,
TextSize = 30,
TextColor = CSS.CSS_Color.FirstLevelTitleColor,
TextAlignment = TextAlignment.TopRight,
- Text = "---",
+ Text = function.GetAttrState(AcstSub_AttrEnum.room_temp.ToString(),"---"),
};
- btnTempValues.Text = function.GetAttrState(AcstSub_AttrEnum.room_temp.ToString());
+#if __IOS__
+ btnTempValues.Width = btnTempValues.GetTextWidth() + Application.GetRealWidth(10);
+#else
btnTempValues.Width = btnTempValues.GetTextWidth();
+#endif
btnTempValues.Gravity = Gravity.CenterHorizontal;
tempValuesView.AddChidren(btnTempValues);
var btnTempValuesUint = new Button()
{
X = btnTempValues.Right,
- Y = Application.GetRealWidth(48),
+ //Y = Application.GetRealWidth(48),
+ Y = Application.GetRealWidth(45),
+ Height = Application.GetRealWidth(66),
TextAlignment = TextAlignment.TopLeft,
Width = Application.GetRealWidth(30),
- Height = Application.GetRealWidth(30),
+ //Height = Application.GetRealWidth(30),
TextSize = 10,
TextColor = CSS.CSS_Color.FirstLevelTitleColor,
Text = "掳C"
};
tempValuesView.AddChidren(btnTempValuesUint);
-
-
var humiValuesView = new FrameLayout()
{
X = Application.GetRealWidth(130+21),
- Y = Application.GetRealWidth(17),
+ Y = Application.GetRealWidth(22),
Width = Application.GetRealWidth(130),
Height = Application.GetRealWidth(132),
};
tempHumiView.AddChidren(humiValuesView);
btnHumiValues = new Button()
{
- Y = Application.GetRealWidth(45),
- Height = Application.GetRealWidth(35),
+ Y = Application.GetRealWidth(39),
+ Height = Application.GetRealWidth(66),
IsBold = true,
TextSize = 30,
TextColor = CSS.CSS_Color.FirstLevelTitleColor,
- Text = "---",
+ Text = function.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString(),"---"),
TextAlignment = TextAlignment.TopRight,
};
- btnHumiValues.Text = function.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString());
btnHumiValues.Width = btnTempValues.GetTextWidth();
btnHumiValues.Gravity = Gravity.CenterHorizontal;
humiValuesView.AddChidren(btnHumiValues);
var btnHumiValuesUint = new Button()
{
X = btnTempValues.Right,
- Y = Application.GetRealWidth(48),
+ Y = Application.GetRealWidth(45),
TextAlignment = TextAlignment.TopLeft,
Width = Application.GetRealWidth(30),
- Height = Application.GetRealWidth(30),
+ Height = Application.GetRealWidth(66),
TextSize = 10,
TextColor = CSS.CSS_Color.FirstLevelTitleColor,
Text = "%"
@@ -201,34 +204,36 @@
#endregion
- btnSetTempValues = new Button()
- {
- X = Application.GetRealWidth((375 - 77 -30)/2),
- Y = Application.GetRealHeight(260),
- Width = Application.GetRealWidth(77),
- Height = Application.GetRealHeight(90),
- TextAlignment = TextAlignment.TopRight,
- TextColor = CSS.CSS_Color.FirstLevelTitleColor,
- IsBold = true,
- TextSize = 60,
- Text = function.GetAttrState(AcstSub_AttrEnum.set_temp.ToString(), "--")
- };
- contentView.AddChidren(btnSetTempValues);
int setTempValue = 0;
+ string setTempStr = "--";
double dd = 0;
double.TryParse(function.GetAttrState(AcstSub_AttrEnum.set_temp.ToString(), "--"), out dd);
setTempValue = Convert.ToInt32(dd);
if (setTempValue != 0)
- btnSetTempValues.Text = setTempValue.ToString();
- //bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
-
+ setTempStr = setTempValue.ToString();
+ btnSetTempValues = new Button()
+ {
+ X = Application.GetRealWidth((375 - 77 -30)/2),
+ Y = Application.GetRealHeight(260),
+ Width = Application.GetRealWidth(73),
+ Height = Application.GetRealHeight(90),
+ TextAlignment = TextAlignment.TopCenter,
+ TextColor = CSS.CSS_Color.FirstLevelTitleColor,
+ IsBold = true,
+ TextSize = 60,
+ Text = setTempStr
+ };
+ contentView.AddChidren(btnSetTempValues);
+#if __IOS__
+ bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
+#endif
var btnSetTempUnit = new Button()
{
X = btnSetTempValues.Right + Application.GetRealWidth(3),
Y = Application.GetRealHeight(267),
- Width = Application.GetRealWidth(30),
+ Width = Application.GetRealWidth(50),
Height = Application.GetRealHeight(50),
TextSize = 23,
TextColor = CSS.CSS_Color.FirstLevelTitleColor,
@@ -253,8 +258,8 @@
contentView.AddChidren(btnMinValuesText);
- int progress = 0;
- int.TryParse(function.GetAttrState(FunctionAttributeKey.SetTemp),out progress);
+ //int progress = 0;
+ //int.TryParse(function.GetAttrState(FunctionAttributeKey.SetTemp),out progress);
tempBar = new DiyImageSeekBar()
{
@@ -267,7 +272,7 @@
ThumbImageHeight = Application.GetRealHeight(51),
ProgressBarColor = function.trait_on_off.curValue.ToString() == "on" ? curColor : CSS_Color.DividingLineColor,
MaxValue = 14,
- Progress = progress + 16,
+ Progress = setTempValue - 16,
SeekBarPadding = Application.GetRealWidth(20),
IsProgressTextShow = false,
ProgressChangeDelayTime = 0,
--
Gitblit v1.8.0