From e13ff34658898c9f506681aa75244fead1fb2153 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期日, 06 六月 2021 14:17:10 +0800
Subject: [PATCH] 2021-6-6-2
---
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs | 62 +++++++++++++++++--------------
1 files changed, 34 insertions(+), 28 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
index b5baaf1..86d0ace 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -153,7 +153,7 @@
TextColor = CSS_Color.TextualColor,
TextAlignment = TextAlignment.CenterLeft,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Text = "--掳C",
+ Text = $"{MainPage.cityInfo.highestTemperature}掳C",
};
topWeatherView.AddChidren(btnTempUpperLimitText);
@@ -176,7 +176,7 @@
TextColor = CSS_Color.TextualColor,
TextAlignment = TextAlignment.CenterLeft,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Text = "--掳C",
+ Text = $"{MainPage.cityInfo.lowestTemperature}掳C",
};
topWeatherView.AddChidren(btnTempLowerLimitText);
@@ -706,46 +706,52 @@
{
Application.RunOnMainThread(() =>
{
- if (bodyView != null)
+ try
{
- for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++)
+ if (bodyView != null)
{
- var sensorTag = updateTemp.sid;
- var view = bodyView.sensorListView.GetChildren(i);
- if (view.GetType() == typeof(FrameLayout))
+ for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++)
{
- if (view.Tag.ToString() != sensorTag)
+ var sensorTag = updateTemp.sid;
+ var view = bodyView.sensorListView.GetChildren(i);
+ if (view.GetType() == typeof(FrameLayout))
{
- continue;
- }
- for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++)
- {
- var btn = (view as FrameLayout).GetChildren(j);
- if (btn.GetType() == typeof(Button))
+ if (view.Tag.ToString() != sensorTag)
{
- if (btn.Tag != null)
+ continue;
+ }
+ for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++)
+ {
+ var btn = (view as FrameLayout).GetChildren(j);
+ if (btn.GetType() == typeof(Button))
{
- var tag = btn.Tag.ToString();
- if (tag == "SensorValues")
+ if (btn.Tag != null)
{
- (btn as Button).Text = updateTemp.GetAttrState(FunctionAttributeKey.Value);
- }
- else if (tag == "SensorLevel")
- {
- (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1];
- (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1];
+ var tag = btn.Tag.ToString();
+ if (tag == "SensorValues")
+ {
+ (btn as Button).Text = updateTemp.GetAttrState(FunctionAttributeKey.Value);
+ }
+ else if (tag == "SensorLevel")
+ {
+ (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1];
+ (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1];
+ }
}
}
- }
- else if (btn.GetType() == typeof(ArcSeekBar))
- {
- (btn as ArcSeekBar).ProgressBarColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1];
+ else if (btn.GetType() == typeof(ArcSeekBar))
+ {
+ (btn as ArcSeekBar).ProgressBarColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1];
- (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp.spk).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp);
+ (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp.spk).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp);
+ }
}
}
}
}
+ }catch(Exception ex )
+ {
+ MainPage.Log($"鏇存柊鐜浼犳劅鍣ㄧ晫闈㈠紓甯�:{ex.Message}");
}
});
}
--
Gitblit v1.8.0