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/EnvironmentalSciencePageBLL.cs | 460 ++++++++++++++++++++++++++++-----------------------------
1 files changed, 228 insertions(+), 232 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs
old mode 100755
new mode 100644
index aac722a..291572d
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs
@@ -1,238 +1,234 @@
-锘縰sing System;
-using HDL_ON.Entity;
-using Shared;
-namespace HDL_ON.UI
-{
- public partial class EnvironmentalSciencePage
- {
+锘�//using System;
+//using HDL_ON.Entity;
+//using Shared;
+//namespace HDL_ON.UI
+//{
+// public partial class EnvironmentalSciencePage
+// {
- void LoadEventList()
- {
+// void LoadEventList()
+// {
- }
+// }
- public static void LoadEvent_UpdataStatus(Sensor sensor)
- {
- Application.RunOnMainThread(() =>{
- if (bodyView != null)
- {
- for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++)
- {
- var sensorTag = sensor.sid;
- if (sensor.bus != null)
- {
- sensorTag = ((int)sensor.functionType % 256) + "_" + sensor.bus.SubnetID + "_" + sensor.bus.DeviceID + "_" + sensor.bus.LoopId;
- }
- var view = bodyView.sensorListView.GetChildren(i);
- if (view.GetType() == typeof(FrameLayout))
- {
- if(view.Tag.ToString() != sensorTag)
- {
- continue;
- }
- for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++)
- {
- var btn = (view as FrameLayout).GetChildren(j);
- if (btn.GetType() == typeof(Button))
- {
- if (btn.Tag!=null)
- {
- var tag = btn.Tag.ToString();
- if (tag == "SensorValues")
- {
- (btn as Button).Text = sensor.values.ToString();
- }
- else if (tag == "SensorLevel")
- {
- (btn as Button).TextID = sensor.levelTextList[sensor.curLevel - 1];
- (btn as Button).TextColor = sensor.levelColorList[sensor.curLevel - 1];
- }
- }
- }
- else if (btn.GetType() == typeof(ArcSeekBar))
- {
- (btn as ArcSeekBar).ProgressBarColor = sensor.levelColorList[sensor.curLevel - 1];
+// public static void LoadEvent_UpdataStatus(Function updateTemp)
+// {
+// Application.RunOnMainThread(() =>{
+// if (bodyView != null)
+// {
+// for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++)
+// {
+// var sensorTag = updateTemp.sid;
+// var view = bodyView.sensorListView.GetChildren(i);
+// if (view.GetType() == typeof(FrameLayout))
+// {
+// if(view.Tag.ToString() != sensorTag)
+// {
+// continue;
+// }
+// for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++)
+// {
+// var btn = (view as FrameLayout).GetChildren(j);
+// if (btn.GetType() == typeof(Button))
+// {
+// if (btn.Tag!=null)
+// {
+// 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];
- (btn as ArcSeekBar).Progress = (96 / sensor.levelColorList.Count) * sensor.curLevel;
- }
- }
- }
- }
- }
- });
- }
+// (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp.spk).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp);
+// }
+// }
+// }
+// }
+// }
+// });
+// }
- void LoadEvent_ChangeWeatherIcon(Button btnWeatherIcon)
- {
+// void LoadEvent_ChangeWeatherIcon(Button btnWeatherIcon)
+// {
- switch (MainPage.cityInfo.weather)
- {
- case "鏅�":
- case "Sunny":
- case "鏅村ぉ":
- case "澶╂櫞":
- case "Clear":
- case "澶ч儴鏅存湕":
- case "Mostly Sunny":
- case "鏅存檪澶氶洸":
- case "闄藉厜鍏呮矝":
- case "Mostly Clear":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/0.png";
- break;
- case "澶氫簯":
- case "Cloudy":
- case "澶氶洸":
- case "灏戜簯":
- case "Partly Cloudy":
- case "灏戦洸":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/1.png";
- break;
- case "闃�":
- case "Overcast":
- case "闄板ぉ":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/2.png";
- break;
- case "闃甸洦":
- case "Showers":
- case "闄i洦":
- case "椹熼洦":
- case "灞�閮ㄩ樀闆�":
- case "Scattered Showers":
- case "灞�鍦伴櫍闆�":
- case "灞�閮ㄥ湴鍗�鎬ч闆�":
- case "灏忛樀闆�":
- case "Light Showers":
- case "灏忛櫍闆�":
- case "闆舵暎椹熼洦":
- case "寮洪樀闆�":
- case "Heavy Showers":
- case "寮烽櫍闆�":
- case "闁撲腑鏈夐闆�":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png";
- break;
- case "闃甸洩":
- case "Snow Showers":
- case "闄i洩":
- case "椹熼洩":
- case "灏忛樀闆�":
- case "Light Snow Showers":
- case "灏忛櫍闆�":
- case "闆舵暎椹熼洩":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png";
- break;
- case "闆�":
- case "Fog":
- case "闇�":
- case "钖勯湩":
- case "鍐婚浘":
- case "Freezing Fog":
- case "鍑嶉湩":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/18.png";
- break;
- case "娌欏皹鏆�":
- case "Sandstorm":
- case "娌欏〉鏆�":
- case "寮烘矙灏樻毚":
- case "Heavy Sandstorm":
- case "寮锋矙濉垫毚":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/20.png";
- break;
- case "娴皹":
- case "Dust":
- case "娴〉":
- case "灏樺嵎椋�":
- case "Dust Storm":
- case "濉垫嵅棰�":
- case "鎵矙":
- case "Sand":
- case "鎻氭矙":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/29.png";
- break;
- case "闇�":
- case "Haze":
- case "鐓欓湠":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/45.png";
- break;
- case "闆烽樀闆�":
- case "Thundershower":
- case "闆烽櫍闆�":
- case "闆烽洦":
- case "闆风數":
- case "Lightning":
- case "闆烽浕":
- case "闆锋毚":
- case "Thunderstorm":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/4.png";
- break;
- case "闆烽樀闆ㄤ即鏈夊啺闆�":
- case "Thundershower with Hail":
- case "闆烽櫍闆ㄤ即鏈夊啺闆�":
- case "闆烽洦浼存湁鍐伴浌":
- case "鍐伴浌":
- case "Hail":
- case "鍐伴拡":
- case "Needle Ice":
- case "鍐伴嚌":
- case "鍐扮矑":
- case "Icy":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/5.png";
- break;
- case "闆ㄥす闆�":
- case "Sleet":
- case "闆ㄥぞ闆�":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/6.png";
- break;
- case "灏忛洦":
- case "Light Rain":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png";
- break;
- case "涓洦":
- case "Rain":
- case "灏忓埌涓洦":
- case "闆�":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png";
- break;
- case "澶ч洦":
- case "Heavy Rain":
- case "涓埌澶ч洦":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png";
- break;
- case "鏆撮洦":
- case "Rainstorm":
- case "璞洦":
- case "澶ф毚闆�":
- case "Heavy Rainstorm":
- case "澶ц豹闆�":
- case "鐗瑰ぇ鏆撮洦":
- case "Extreme Rainstorm":
- case "瓒呭ぇ璞洦":
- case "澶у埌鏆撮洦":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png";
- break;
- case "灏忛洩":
- case "Light Snow":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png";
- break;
- case "闆�":
- case "涓洩":
- case "灏忓埌涓洩":
- case "Snow":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png";
- break;
- case "澶ч洩":
- case "Heavy Snow":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png";
- break;
- case "鏆撮洩":
- case "Blizzard":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png";
- break;
- case "鍐婚洦":
- case "Freezing Rain":
- case "鍑嶉洦":
- btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/6.png";
- break;
- }
- }
- }
-}
+// switch (MainPage.cityInfo.weather)
+// {
+// case "鏅�":
+// case "Sunny":
+// case "鏅村ぉ":
+// case "澶╂櫞":
+// case "Clear":
+// case "澶ч儴鏅存湕":
+// case "Mostly Sunny":
+// case "鏅存檪澶氶洸":
+// case "闄藉厜鍏呮矝":
+// case "Mostly Clear":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/0.png";
+// break;
+// case "澶氫簯":
+// case "Cloudy":
+// case "澶氶洸":
+// case "灏戜簯":
+// case "Partly Cloudy":
+// case "灏戦洸":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/1.png";
+// break;
+// case "闃�":
+// case "Overcast":
+// case "闄板ぉ":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/2.png";
+// break;
+// case "闃甸洦":
+// case "Showers":
+// case "闄i洦":
+// case "椹熼洦":
+// case "灞�閮ㄩ樀闆�":
+// case "Scattered Showers":
+// case "灞�鍦伴櫍闆�":
+// case "灞�閮ㄥ湴鍗�鎬ч闆�":
+// case "灏忛樀闆�":
+// case "Light Showers":
+// case "灏忛櫍闆�":
+// case "闆舵暎椹熼洦":
+// case "寮洪樀闆�":
+// case "Heavy Showers":
+// case "寮烽櫍闆�":
+// case "闁撲腑鏈夐闆�":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png";
+// break;
+// case "闃甸洩":
+// case "Snow Showers":
+// case "闄i洩":
+// case "椹熼洩":
+// case "灏忛樀闆�":
+// case "Light Snow Showers":
+// case "灏忛櫍闆�":
+// case "闆舵暎椹熼洩":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png";
+// break;
+// case "闆�":
+// case "Fog":
+// case "闇�":
+// case "钖勯湩":
+// case "鍐婚浘":
+// case "Freezing Fog":
+// case "鍑嶉湩":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/18.png";
+// break;
+// case "娌欏皹鏆�":
+// case "Sandstorm":
+// case "娌欏〉鏆�":
+// case "寮烘矙灏樻毚":
+// case "Heavy Sandstorm":
+// case "寮锋矙濉垫毚":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/20.png";
+// break;
+// case "娴皹":
+// case "Dust":
+// case "娴〉":
+// case "灏樺嵎椋�":
+// case "Dust Storm":
+// case "濉垫嵅棰�":
+// case "鎵矙":
+// case "Sand":
+// case "鎻氭矙":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/29.png";
+// break;
+// case "闇�":
+// case "Haze":
+// case "鐓欓湠":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/45.png";
+// break;
+// case "闆烽樀闆�":
+// case "Thundershower":
+// case "闆烽櫍闆�":
+// case "闆烽洦":
+// case "闆风數":
+// case "Lightning":
+// case "闆烽浕":
+// case "闆锋毚":
+// case "Thunderstorm":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/4.png";
+// break;
+// case "闆烽樀闆ㄤ即鏈夊啺闆�":
+// case "Thundershower with Hail":
+// case "闆烽櫍闆ㄤ即鏈夊啺闆�":
+// case "闆烽洦浼存湁鍐伴浌":
+// case "鍐伴浌":
+// case "Hail":
+// case "鍐伴拡":
+// case "Needle Ice":
+// case "鍐伴嚌":
+// case "鍐扮矑":
+// case "Icy":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/5.png";
+// break;
+// case "闆ㄥす闆�":
+// case "Sleet":
+// case "闆ㄥぞ闆�":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/6.png";
+// break;
+// case "灏忛洦":
+// case "Light Rain":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png";
+// break;
+// case "涓洦":
+// case "Rain":
+// case "灏忓埌涓洦":
+// case "闆�":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png";
+// break;
+// case "澶ч洦":
+// case "Heavy Rain":
+// case "涓埌澶ч洦":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png";
+// break;
+// case "鏆撮洦":
+// case "Rainstorm":
+// case "璞洦":
+// case "澶ф毚闆�":
+// case "Heavy Rainstorm":
+// case "澶ц豹闆�":
+// case "鐗瑰ぇ鏆撮洦":
+// case "Extreme Rainstorm":
+// case "瓒呭ぇ璞洦":
+// case "澶у埌鏆撮洦":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png";
+// break;
+// case "灏忛洩":
+// case "Light Snow":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png";
+// break;
+// case "闆�":
+// case "涓洩":
+// case "灏忓埌涓洩":
+// case "Snow":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png";
+// break;
+// case "澶ч洩":
+// case "Heavy Snow":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png";
+// break;
+// case "鏆撮洩":
+// case "Blizzard":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png";
+// break;
+// case "鍐婚洦":
+// case "Freezing Rain":
+// case "鍑嶉洦":
+// btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/6.png";
+// break;
+// }
+// }
+// }
+//}
--
Gitblit v1.8.0