From b562a582ac3a288193e6e4f57c5eff8a344305a4 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 13:52:17 +0800
Subject: [PATCH] Update AndroidManifest.xml
---
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs | 348 +++++++++++++++++++++++++++++++--------------------------
1 files changed, 187 insertions(+), 161 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
index 75388ce..c175e21 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -24,6 +24,7 @@
Sensor sensorTemp = new Sensor();
+
Function function;
List<Function> showFunctions;
List<Function> sensorList;
@@ -69,7 +70,7 @@
{
Y = Application.GetRealHeight(64),
Height = Application.GetRealHeight(600),
- ScrollEnabled = false
+ ScrollEnabled = sensorList.Count > 6
};
bodyView.AddChidren(contentView);
@@ -237,16 +238,6 @@
TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
});
break;
- //case SPK.SensorPm25:
- //_intervalValue.Add("0 ~ 35");
- //_intervalValue.Add("36 ~ 75");
- //_intervalValue.Add("76 ~ 115");
- //_intervalValue.Add("115 ~");
- //_levelTextList.Add(StringId.Great);
- //_levelTextList.Add(StringId.Good);
- //_levelTextList.Add(StringId.MildPollution);
- //_levelTextList.Add(StringId.HeavyPollution);
- //break;
case SPK.SensorCO2:
tipValuesView.AddChidren(new Button()
{
@@ -487,7 +478,7 @@
tipValuesView.AddChidren(new Button()
{
Width = Application.GetRealWidth(151),
- Text = "40%",
+ Text = "70%",
TextAlignment = TextAlignment.Center,
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
@@ -495,7 +486,7 @@
tipValuesView.AddChidren(new Button()
{
Width = Application.GetRealWidth(151),
- Text = "70%",
+ Text = "40%",
TextAlignment = TextAlignment.Center,
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
@@ -503,7 +494,7 @@
tipTextView.AddChidren(new Button()
{
Width = Application.GetRealWidth(101),
- TextID = StringId.SensorReferenceHumidityTipLevel1,
+ TextID = StringId.SensorReferenceHumidityTipLevel3,
TextAlignment = TextAlignment.Center,
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
@@ -519,7 +510,7 @@
tipTextView.AddChidren(new Button()
{
Width = Application.GetRealWidth(101),
- TextID = StringId.SensorReferenceHumidityTipLevel3,
+ TextID = StringId.SensorReferenceHumidityTipLevel1,
TextAlignment = TextAlignment.Center,
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
@@ -657,161 +648,186 @@
bool initTitleButton = true;
int index = 1;
- foreach (var tempSensor in sensorList)
+ try
{
- if (tempSensor.sid == function.sid)
+ new System.Threading.Thread(() =>
{
- continue;
- }
- if (tempSensor.spk != function.spk)
- {
- continue;
- }
- contentView.ScrollEnabled = true;
- if (initTitleButton)
- {
- Button btnOthreTitle = new Button()
+ foreach (var tempSensor in sensorList)
{
- X = Application.GetRealWidth(16),
- Width = Application.GetRealWidth(200),
- Height = Application.GetRealWidth(38),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextID = StringId.OtherArea,
- };
- contentView.AddChidren(btnOthreTitle);
- initTitleButton = false;
- }
+ if (index >= 6)
+ {
+ break;
+ }
+
+ if (tempSensor.sid == function.sid)
+ {
+ continue;
+ }
+ if (tempSensor.spk != function.spk)
+ {
+ continue;
+ }
- #region 鍏跺畠浼犳劅鍣ㄤ俊鎭爮
- FrameLayout otherInfoView = new FrameLayout()
- {
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(343),
- Height = Application.GetRealWidth(100),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- Radius = (uint)Application.GetRealWidth(12),
- BorderColor = 0x00000000,
- BorderWidth = 0,
- };
- contentView.AddChidren(otherInfoView);
-
- Button btnTipColor1 = new Button()
- {
- X = Application.GetRealWidth(8),
- Y = Application.GetRealWidth(16),
- Width = Application.GetRealWidth(12),
- Height = Application.GetRealWidth(12),
- BackgroundColor = tipColorList[index++],
- Radius = (uint)Application.GetRealWidth(2),
- BorderWidth = 0,
- BorderColor = 0x00000000,
- };
- otherInfoView.AddChidren(btnTipColor1);
-
- Button btnSensorName = new Button()
- {
- X = Application.GetRealWidth(28),
- Y = Application.GetRealWidth(10),
- Width = Application.GetRealWidth(250),
- Height = Application.GetRealWidth(24),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- Text = function.name,
- IsBold = true,
- };
- otherInfoView.AddChidren(btnSensorName);
-
- Button btnFromFoorAndRoom1 = new Button()
- {
- X = Application.GetRealWidth(16),
- Y = btnSeltSensorName.Bottom,
- Width = Application.GetRealWidth(270),
- Height = Application.GetRealHeight(21),
- TextColor = CSS_Color.PromptingColor1,
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Text = tempSensor.GetRoomListName()
- };
- otherInfoView.AddChidren(btnFromFoorAndRoom1);
-
- var btnSetting1 = new Button()
- {
- X = Application.GetRealWidth(291),
- Y = Application.GetRealWidth(6),
- Width = Application.GetMinRealAverage(32),
- Height = Application.GetMinRealAverage(32),
- UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
- };
- otherInfoView.AddChidren(btnSetting1);
-
- btnSetting1.MouseUpEventHandler = (sender, e) =>
- {
- Action backAction = () =>
- {
- MainPage.Log("45678i");
Application.RunOnMainThread(() =>
{
- btnSeltSensorName.Text = tempSensor.name;
+ if (initTitleButton)
+ {
+ Button btnOthreTitle = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(200),
+ Height = Application.GetRealWidth(38),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextID = StringId.OtherArea,
+ };
+ contentView.AddChidren(btnOthreTitle);
+ initTitleButton = false;
+ }
+
+ #region 鍏跺畠浼犳劅鍣ㄤ俊鎭爮
+ FrameLayout otherInfoView = new FrameLayout()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealWidth(100),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(12),
+ BorderColor = 0x00000000,
+ BorderWidth = 0,
+ };
+ contentView.AddChidren(otherInfoView);
+
+ Button btnTipColor1 = new Button()
+ {
+ X = Application.GetRealWidth(8),
+ Y = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(12),
+ Height = Application.GetRealWidth(12),
+ BackgroundColor = tipColorList[index++],
+ Radius = (uint)Application.GetRealWidth(2),
+ BorderWidth = 0,
+ BorderColor = 0x00000000,
+ };
+ otherInfoView.AddChidren(btnTipColor1);
+
+ Button btnSensorName = new Button()
+ {
+ X = Application.GetRealWidth(28),
+ Y = Application.GetRealWidth(10),
+ Width = Application.GetRealWidth(250),
+ Height = Application.GetRealWidth(24),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ Text = tempSensor.name,
+ IsBold = true,
+ };
+ otherInfoView.AddChidren(btnSensorName);
+
+ Button btnFromFoorAndRoom1 = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = btnSeltSensorName.Bottom,
+ Width = Application.GetRealWidth(270),
+ Height = Application.GetRealHeight(21),
+ TextColor = CSS_Color.PromptingColor1,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = tempSensor.GetRoomListName()
+ };
+ otherInfoView.AddChidren(btnFromFoorAndRoom1);
+
+ var btnSetting1 = new Button()
+ {
+ X = Application.GetRealWidth(291),
+ Y = Application.GetRealWidth(6),
+ Width = Application.GetMinRealAverage(32),
+ Height = Application.GetMinRealAverage(32),
+ UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
+ };
+ otherInfoView.AddChidren(btnSetting1);
+
+ btnSetting1.MouseUpEventHandler = (sender, e) =>
+ {
+ Action backAction = () =>
+ {
+ MainPage.Log("45678i");
+ Application.RunOnMainThread(() =>
+ {
+ btnSeltSensorName.Text = tempSensor.name;
+ });
+ };
+ var infoView = new FunctionBaseInfoSetPage(tempSensor, backAction);
+ MainPage.BasePageView.AddChidren(infoView);
+ infoView.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+
+ Button btnSensorValue = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Y = Application.GetRealWidth(47),
+ Width = Application.GetRealWidth(200),
+ Height = Application.GetRealWidth(43),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ IsBold = true,
+ TextSize = CSS_FontSize.HeadlineFontSize,
+ };
+ otherInfoView.AddChidren(btnSensorValue);
+
+ var btnShowData1 = new Button()
+ {
+ X = Application.GetRealWidth(291),
+ Y = Application.GetRealWidth(62),
+ Width = Application.GetMinRealAverage(32),
+ Height = Application.GetMinRealAverage(32),
+ UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIcon.png",
+ SelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png",
+ };
+ otherInfoView.AddChidren(btnShowData1);
+ btnShowData1.MouseUpEventHandler = (sender, e) =>
+ {
+ btnShowData1.IsSelected = !btnShowData1.IsSelected;
+ if (btnShowData1.IsSelected)
+ {
+ if (!showFunctions.Contains(tempSensor))
+ {
+ showFunctions.Add(tempSensor);
+ }
+ }
+ else
+ {
+ if (showFunctions.Contains(tempSensor))
+ {
+ showFunctions.Remove(tempSensor);
+ }
+ }
+ LoadMothed_GetSensorHistoryData();
+ };
+ #endregion
+
+ contentView.AddChidren(new Button()
+ {
+ Height = Application.GetRealHeight(12),
+ });
});
- };
- var infoView = new FunctionBaseInfoSetPage(tempSensor, backAction);
- MainPage.BasePageView.AddChidren(infoView);
- infoView.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- };
-
- Button btnSensorValue = new Button()
- {
- X = Application.GetRealWidth(16),
- Y = Application.GetRealWidth(47),
- Width = Application.GetRealWidth(200),
- Height = Application.GetRealWidth(43),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- IsBold = true,
- TextSize = CSS_FontSize.HeadlineFontSize,
- };
- otherInfoView.AddChidren(btnSensorValue);
-
- var btnShowData1 = new Button()
- {
- X = Application.GetRealWidth(291),
- Y = Application.GetRealWidth(62),
- Width = Application.GetMinRealAverage(32),
- Height = Application.GetMinRealAverage(32),
- UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIcon.png",
- SelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png",
- };
- otherInfoView.AddChidren(btnShowData1);
- btnShowData1.MouseUpEventHandler = (sender, e) => {
- btnShowData1.IsSelected = !btnShowData1.IsSelected;
- if (btnShowData1.IsSelected)
- {
- if (!showFunctions.Contains(tempSensor))
- {
- showFunctions.Add(tempSensor);
- }
+ System.Threading.Thread.Sleep(50);
}
- else
- {
- if (showFunctions.Contains(tempSensor))
+ Application.RunOnMainThread(() => {
+ if (index > 1)
{
- showFunctions.Remove(tempSensor);
+ contentView.ScrollEnabled = true;
}
- }
- LoadMothed_GetSensorHistoryData();
- };
- #endregion
-
- contentView.AddChidren(new Button()
- {
- Height = Application.GetRealHeight(12),
- });
-
+ });
+ }).Start();
+ }
+ catch(Exception ex)
+ {
+ MainPage.Log($"鍔犺浇浼犳劅鍣ㄥ紓甯竫x:{ex.Message}");
}
#endregion
new TopViewDiv(bodyView, Language.StringByID(sensorTemp.GetFunctionTypeNameId(function.spk))).LoadTopView();
@@ -819,6 +835,7 @@
LoadMothed_GetSensorHistoryData();
LoadEvent_ChangeSensorHistoryShowType();
}
+
}
@@ -883,7 +900,7 @@
}
ebl.InitXdataText(vs);
}
- yDataString += ebl.InitYdataText(sr.name, revertData, tipColorStringList[i]);
+ yDataString += ebl.InitYdataText("", revertData, tipColorStringList[i]);
}
}
i++;
@@ -892,9 +909,18 @@
Application.RunOnMainThread(() =>
{
+ if (curQueryType == "hour")
+ {
+ ebl.xTitle = Language.StringByID(StringId.HourUint);
+ }
+ else
+ {
+ ebl.xTitle = Language.StringByID(StringId.Date);
+ }
+ ebl.yTitle = Language.StringByID(StringId.Uint) + "(" + sensorTemp.Unit(function) + ")";
+
myEchartsView.ShowWithOption(ebl.InitOption());
});
-
}
catch (Exception ex)
{
--
Gitblit v1.8.0