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/EnvironmentalSciencePage.cs | 1347 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 673 insertions(+), 674 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePage.cs
index b56b37f..7a4bc60 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePage.cs
@@ -1,752 +1,751 @@
-锘縰sing System;
-using Shared;
-using HDL_ON.Entity;
-using HDL_ON.UI.CSS;
-using System.Collections.Generic;
-using HDL_ON.DriverLayer;
+锘�//using System;
+//using Shared;
+//using HDL_ON.Entity;
+//using HDL_ON.UI.CSS;
+//using System.Collections.Generic;
+//using HDL_ON.DriverLayer;
-namespace HDL_ON.UI
-{
- public partial class EnvironmentalSciencePage : FrameLayout
- {
+//namespace HDL_ON.UI
+//{
+// public partial class EnvironmentalSciencePage : FrameLayout
+// {
- #region 鎺т欢闆嗗悎
- static EnvironmentalSciencePage bodyView;
- /// <summary>
- /// 妤煎眰鏄剧ず
- /// </summary>
- Button btnRoom;
- /// <summary>
- /// 鎴块棿閫夋嫨涓嬫媺鍥炬爣
- /// </summary>
- Button btnFoorDownIcon;
- /// <summary>
- /// 鎴块棿閫夋嫨瑙﹀彂鍖哄煙
- /// </summary>
- Button btnRoomClickRow;
- /// <summary>
- /// 浼犳劅鍣ㄥ垪琛ㄥ尯鍩�
- /// </summary>
- FrameLayout sensorListView;
+// #region 鎺т欢闆嗗悎
+// static EnvironmentalSciencePage bodyView;
+// /// <summary>
+// /// 妤煎眰鏄剧ず
+// /// </summary>
+// Button btnRoom;
+// /// <summary>
+// /// 鎴块棿閫夋嫨涓嬫媺鍥炬爣
+// /// </summary>
+// Button btnFoorDownIcon;
+// /// <summary>
+// /// 鎴块棿閫夋嫨瑙﹀彂鍖哄煙
+// /// </summary>
+// Button btnRoomClickRow;
+// /// <summary>
+// /// 浼犳劅鍣ㄥ垪琛ㄥ尯鍩�
+// /// </summary>
+// FrameLayout sensorListView;
- /// <summary>
- /// 澶╂皵鍚嶇О鏂囨湰
- /// </summary>
- Button btnWatherText;
- /// <summary>
- /// 婀垮害鏁版嵁鏂囨湰
- /// </summary>
- Button btnHumidityText;
- /// <summary>
- /// pm25鏁版嵁鏂囨湰
- /// </summary>
- Button btnPm25Values;
- /// <summary>
- /// 椋庨�熸暟鎹枃鏈�
- /// </summary>
- Button btnFanSpeedValues;
+// /// <summary>
+// /// 澶╂皵鍚嶇О鏂囨湰
+// /// </summary>
+// Button btnWatherText;
+// /// <summary>
+// /// 婀垮害鏁版嵁鏂囨湰
+// /// </summary>
+// Button btnHumidityText;
+// /// <summary>
+// /// pm25鏁版嵁鏂囨湰
+// /// </summary>
+// Button btnPm25Values;
+// /// <summary>
+// /// 椋庨�熸暟鎹枃鏈�
+// /// </summary>
+// Button btnFanSpeedValues;
- #endregion
- #region 鍖哄煙鍙橀噺
- Room room;
+// #endregion
+// #region 鍖哄煙鍙橀噺
+// Room room;
- #endregion
+// Sensor sensorTemp = new Sensor();
+// #endregion
- public EnvironmentalSciencePage()
- {
- bodyView = this;
- }
+// public EnvironmentalSciencePage()
+// {
+// bodyView = this;
+// }
- /// <summary>
- /// 鍔犺浇鐣岄潰
- /// </summary>
- /// <param name="btnCollectionIcon">鏀惰棌鎸夐挳</param>
- /// <param name="btnFunctionName">鍔熻兘鍚嶇О淇℃伅鎸夐挳</param>
- /// <param name="btnFromFloor">鍔熻兘妤煎眰淇℃伅鎸夐挳</param>
- public void LoadPage()
- {
- bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
+// /// <summary>
+// /// 鍔犺浇鐣岄潰
+// /// </summary>
+// /// <param name="btnCollectionIcon">鏀惰棌鎸夐挳</param>
+// /// <param name="btnFunctionName">鍔熻兘鍚嶇О淇℃伅鎸夐挳</param>
+// /// <param name="btnFromFloor">鍔熻兘妤煎眰淇℃伅鎸夐挳</param>
+// public void LoadPage()
+// {
+// bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
- #region 椤堕儴澶╂皵閮ㄥ垎
- var topWeatherView = new FrameLayout() {
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(76),
- Width = Application.GetRealWidth(343),
- Height = Application.GetRealHeight(151),
- BackgroundColor = CSS_Color.MainColor,
- Radius = (uint)Application.GetRealWidth(12),
- };
- bodyView.AddChidren(topWeatherView);
+// #region 椤堕儴澶╂皵閮ㄥ垎
+// var topWeatherView = new FrameLayout() {
+// Gravity = Gravity.CenterHorizontal,
+// Y = Application.GetRealHeight(76),
+// Width = Application.GetRealWidth(343),
+// Height = Application.GetRealHeight(151),
+// BackgroundColor = CSS_Color.MainColor,
+// Radius = (uint)Application.GetRealWidth(12),
+// };
+// bodyView.AddChidren(topWeatherView);
- var btnTemp = new Button()
- {
- X = Application.GetRealWidth(24),
- Y = Application.GetRealHeight(16),
- Width = Application.GetRealWidth(60),
- Height = Application.GetRealHeight(48),
- TextSize = 42,
- IsBold = true,
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.MainBackgroundColor,
- Text = MainPage.cityInfo.temperature,
- };
- topWeatherView.AddChidren(btnTemp);
+// var btnTemp = new Button()
+// {
+// X = Application.GetRealWidth(24),
+// Y = Application.GetRealHeight(16),
+// Width = Application.GetRealWidth(60),
+// Height = Application.GetRealHeight(48),
+// TextSize = 42,
+// IsBold = true,
+// TextAlignment = TextAlignment.CenterLeft,
+// TextColor = CSS_Color.MainBackgroundColor,
+// Text = MainPage.cityInfo.temperature,
+// };
+// topWeatherView.AddChidren(btnTemp);
- var btnTempUint = new Button()
- {
- X = Application.GetRealWidth(79),
- Y = Application.GetRealHeight(16),
- Width = Application.GetRealWidth(20),
- Height = Application.GetRealHeight(20),
- TextSize = 12,
- TextColor = CSS_Color.MainBackgroundColor,
- Text = "掳C",
- };
- topWeatherView.AddChidren(btnTempUint);
+// var btnTempUint = new Button()
+// {
+// X = Application.GetRealWidth(79),
+// Y = Application.GetRealHeight(16),
+// Width = Application.GetRealWidth(20),
+// Height = Application.GetRealHeight(20),
+// TextSize = 12,
+// TextColor = CSS_Color.MainBackgroundColor,
+// Text = "掳C",
+// };
+// topWeatherView.AddChidren(btnTempUint);
- var btnWeatherIcon = new Button()
- {
- X = Application.GetRealWidth(115),
- Y = Application.GetRealHeight(16),
- Width = Application.GetRealWidth(20),
- Height = Application.GetRealWidth(20),
- UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/SmogIcon.png",
- };
- topWeatherView.AddChidren(btnWeatherIcon);
- LoadEvent_ChangeWeatherIcon(btnWeatherIcon);
+// var btnWeatherIcon = new Button()
+// {
+// X = Application.GetRealWidth(115),
+// Y = Application.GetRealHeight(16),
+// Width = Application.GetRealWidth(20),
+// Height = Application.GetRealWidth(20),
+// UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/SmogIcon.png",
+// };
+// topWeatherView.AddChidren(btnWeatherIcon);
+// LoadEvent_ChangeWeatherIcon(btnWeatherIcon);
- btnWatherText = new Button()
- {
- X = Application.GetRealWidth(139),
- Y = Application.GetRealHeight(16),
- Width = Application.GetRealWidth(28 * 3),
- Height = Application.GetRealHeight(20),
- TextColor = CSS_Color.MainBackgroundColor,
- TextSize = CSS_FontSize.TextFontSize,
- TextAlignment = TextAlignment.CenterLeft,
- Text = MainPage.cityInfo.weather
- };
- topWeatherView.AddChidren(btnWatherText);
+// btnWatherText = new Button()
+// {
+// X = Application.GetRealWidth(139),
+// Y = Application.GetRealHeight(16),
+// Width = Application.GetRealWidth(28 * 3),
+// Height = Application.GetRealHeight(20),
+// TextColor = CSS_Color.MainBackgroundColor,
+// TextSize = CSS_FontSize.TextFontSize,
+// TextAlignment = TextAlignment.CenterLeft,
+// Text = MainPage.cityInfo.weather
+// };
+// topWeatherView.AddChidren(btnWatherText);
- var btnTempUpperLimit = new Button()
- {
- X = btnWeatherIcon.X,
- Y = Application.GetRealHeight(46),
- Width = Application.GetRealWidth(16),
- Height = Application.GetRealWidth(16),
- UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/UpArrow.png",
- };
- topWeatherView.AddChidren(btnTempUpperLimit);
+// var btnTempUpperLimit = new Button()
+// {
+// X = btnWeatherIcon.X,
+// Y = Application.GetRealHeight(46),
+// Width = Application.GetRealWidth(16),
+// Height = Application.GetRealWidth(16),
+// UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/UpArrow.png",
+// };
+// topWeatherView.AddChidren(btnTempUpperLimit);
- var btnTempUpperLimitText = new Button()
- {
- X = btnTempUpperLimit.Right,
- Y = Application.GetRealHeight(44),
- Width = Application.GetRealWidth(42),
- Height = Application.GetRealHeight(20),
- TextColor = CSS_Color.MainBackgroundColor,
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.TextFontSize,
- Text = "10掳C",
- };
- topWeatherView.AddChidren(btnTempUpperLimitText);
+// var btnTempUpperLimitText = new Button()
+// {
+// X = btnTempUpperLimit.Right,
+// Y = Application.GetRealHeight(44),
+// Width = Application.GetRealWidth(42),
+// Height = Application.GetRealHeight(20),
+// TextColor = CSS_Color.MainBackgroundColor,
+// TextAlignment = TextAlignment.CenterLeft,
+// TextSize = CSS_FontSize.TextFontSize,
+// Text = "10掳C",
+// };
+// topWeatherView.AddChidren(btnTempUpperLimitText);
- var btnTempLowerLimit = new Button()
- {
- X = btnTempUpperLimitText.Right,
- Y = Application.GetRealHeight(46),
- Width = Application.GetRealWidth(16),
- Height = Application.GetRealWidth(16),
- UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/UpArrow.png",
- };
- btnTempLowerLimit.SetRotation(180f);
- topWeatherView.AddChidren(btnTempLowerLimit);
+// var btnTempLowerLimit = new Button()
+// {
+// X = btnTempUpperLimitText.Right,
+// Y = Application.GetRealHeight(46),
+// Width = Application.GetRealWidth(16),
+// Height = Application.GetRealWidth(16),
+// UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/UpArrow.png",
+// };
+// btnTempLowerLimit.SetRotation(180f);
+// topWeatherView.AddChidren(btnTempLowerLimit);
- var btnTempLowerLimitText = new Button()
- {
- X = btnTempLowerLimit.Right,
- Y = Application.GetRealHeight(44),
- Width = Application.GetRealWidth(42),
- Height = Application.GetRealHeight(20),
- TextColor = CSS_Color.MainBackgroundColor,
- TextAlignment = TextAlignment.CenterLeft,
- TextSize = CSS_FontSize.TextFontSize,
- Text = "2掳C",
- };
- topWeatherView.AddChidren(btnTempLowerLimitText);
+// var btnTempLowerLimitText = new Button()
+// {
+// X = btnTempLowerLimit.Right,
+// Y = Application.GetRealHeight(44),
+// Width = Application.GetRealWidth(42),
+// Height = Application.GetRealHeight(20),
+// TextColor = CSS_Color.MainBackgroundColor,
+// TextAlignment = TextAlignment.CenterLeft,
+// TextSize = CSS_FontSize.TextFontSize,
+// Text = "2掳C",
+// };
+// topWeatherView.AddChidren(btnTempLowerLimitText);
- var btnLocationText = new Button()
- {
- X = Application.GetRealWidth(233),
- Y = Application.GetRealHeight(18),
- Width = Application.GetRealWidth(74),
- Height = Application.GetRealHeight(17),
- TextAlignment = TextAlignment.CenterRight,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextColor = CSS_Color.MainBackgroundColor,
- Text = MainPage.cityInfo.location,
- };
- topWeatherView.AddChidren(btnLocationText);
+// var btnLocationText = new Button()
+// {
+// X = Application.GetRealWidth(233),
+// Y = Application.GetRealHeight(18),
+// Width = Application.GetRealWidth(74),
+// Height = Application.GetRealHeight(17),
+// TextAlignment = TextAlignment.CenterRight,
+// TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+// TextColor = CSS_Color.MainBackgroundColor,
+// Text = MainPage.cityInfo.location,
+// };
+// topWeatherView.AddChidren(btnLocationText);
- var btnLocationIcon = new Button()
- {
- X = btnLocationText.Right,
- Y = Application.GetRealHeight(18),
- Width = Application.GetRealWidth(16),
- Height = Application.GetRealHeight(16),
- UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/LocationIcon.png",
- };
- topWeatherView.AddChidren(btnLocationIcon);
+// var btnLocationIcon = new Button()
+// {
+// X = btnLocationText.Right,
+// Y = Application.GetRealHeight(18),
+// Width = Application.GetRealWidth(16),
+// Height = Application.GetRealHeight(16),
+// UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/LocationIcon.png",
+// };
+// topWeatherView.AddChidren(btnLocationIcon);
- Button btnHumidityIcon = new Button()
- {
- X = Application.GetRealWidth(26),
- Y = Application.GetRealHeight(90),
- Width = Application.GetRealWidth(24),
- Height = Application.GetRealWidth(24),
- UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/HumidityIcon.png",
- };
- topWeatherView.AddChidren(btnHumidityIcon);
+// Button btnHumidityIcon = new Button()
+// {
+// X = Application.GetRealWidth(26),
+// Y = Application.GetRealHeight(90),
+// Width = Application.GetRealWidth(24),
+// Height = Application.GetRealWidth(24),
+// UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/HumidityIcon.png",
+// };
+// topWeatherView.AddChidren(btnHumidityIcon);
- btnHumidityText = new Button()
- {
- X = Application.GetRealWidth(15),
- Y = btnHumidityIcon.Bottom,
- Width = Application.GetRealWidth(46),
- Height = Application.GetRealHeight(25),
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.MainBackgroundColor,
- Text = MainPage.cityInfo.humidity + "%",
- };
- topWeatherView.AddChidren(btnHumidityText);
+// btnHumidityText = new Button()
+// {
+// X = Application.GetRealWidth(15),
+// Y = btnHumidityIcon.Bottom,
+// Width = Application.GetRealWidth(46),
+// Height = Application.GetRealHeight(25),
+// TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+// TextAlignment = TextAlignment.Center,
+// TextColor = CSS_Color.MainBackgroundColor,
+// Text = MainPage.cityInfo.humidity + "%",
+// };
+// topWeatherView.AddChidren(btnHumidityText);
- Button btnPm25Icon = new Button()
- {
- X = Application.GetRealWidth(104),
- Y = Application.GetRealHeight(90),
- Width = Application.GetRealWidth(24),
- Height = Application.GetRealWidth(24),
- UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/Pm25Icon.png",
- };
- topWeatherView.AddChidren(btnPm25Icon);
+// Button btnPm25Icon = new Button()
+// {
+// X = Application.GetRealWidth(104),
+// Y = Application.GetRealHeight(90),
+// Width = Application.GetRealWidth(24),
+// Height = Application.GetRealWidth(24),
+// UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/Pm25Icon.png",
+// };
+// topWeatherView.AddChidren(btnPm25Icon);
- btnPm25Values = new Button()
- {
- X = Application.GetRealWidth(90),
- Y = btnHumidityIcon.Bottom,
- Width = Application.GetRealWidth(52),
- Height = Application.GetRealHeight(25),
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.MainBackgroundColor,
- Text = MainPage.cityInfo.pm25,
- };
- topWeatherView.AddChidren(btnPm25Values);
+// btnPm25Values = new Button()
+// {
+// X = Application.GetRealWidth(90),
+// Y = btnHumidityIcon.Bottom,
+// Width = Application.GetRealWidth(52),
+// Height = Application.GetRealHeight(25),
+// TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+// TextAlignment = TextAlignment.Center,
+// TextColor = CSS_Color.MainBackgroundColor,
+// Text = MainPage.cityInfo.pm25,
+// };
+// topWeatherView.AddChidren(btnPm25Values);
- Button btnFanSpeedIcon = new Button()
- {
- X = Application.GetRealWidth(182),
- Y = Application.GetRealHeight(90),
- Width = Application.GetRealWidth(24),
- Height = Application.GetRealWidth(24),
- UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/WeatherFanSpeedIcon.png",
- };
- topWeatherView.AddChidren(btnFanSpeedIcon);
+// Button btnFanSpeedIcon = new Button()
+// {
+// X = Application.GetRealWidth(182),
+// Y = Application.GetRealHeight(90),
+// Width = Application.GetRealWidth(24),
+// Height = Application.GetRealWidth(24),
+// UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/WeatherFanSpeedIcon.png",
+// };
+// topWeatherView.AddChidren(btnFanSpeedIcon);
- btnFanSpeedValues = new Button()
- {
- X = Application.GetRealWidth(162),
- Y = btnFanSpeedIcon.Bottom,
- Width = Application.GetRealWidth(63),
- Height = Application.GetRealHeight(25),
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.MainBackgroundColor,
- Text = MainPage.cityInfo.windLevel,
- };
- topWeatherView.AddChidren(btnFanSpeedValues);
- #endregion
+// btnFanSpeedValues = new Button()
+// {
+// X = Application.GetRealWidth(162),
+// Y = btnFanSpeedIcon.Bottom,
+// Width = Application.GetRealWidth(63),
+// Height = Application.GetRealHeight(25),
+// TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+// TextAlignment = TextAlignment.Center,
+// TextColor = CSS_Color.MainBackgroundColor,
+// Text = MainPage.cityInfo.windLevel,
+// };
+// topWeatherView.AddChidren(btnFanSpeedValues);
+// #endregion
- #region contentView
- FrameLayout contentView = new FrameLayout()
- {
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(239),
- Width = Application.GetRealWidth(343),
- Height = Application.GetRealHeight(418),
- Radius = (uint)Application.GetRealWidth(12),
- BorderColor = 0x00000000,
- BorderWidth = 0,
- BackgroundColor = CSS_Color.BackgroundColor,
- };
- bodyView.AddChidren(contentView);
+// #region contentView
+// FrameLayout contentView = new FrameLayout()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Y = Application.GetRealHeight(239),
+// Width = Application.GetRealWidth(343),
+// Height = Application.GetRealHeight(418),
+// Radius = (uint)Application.GetRealWidth(12),
+// BorderColor = 0x00000000,
+// BorderWidth = 0,
+// BackgroundColor = CSS_Color.BackgroundColor,
+// };
+// bodyView.AddChidren(contentView);
- #region 鎴块棿椤堕儴鍒囨崲鏄剧ず鍖哄煙
- room = new Room() { roomName = Language.StringByID(StringId.All)};
- //if (DB_ResidenceData.rooms.Count > 0)
- //{
- // room = DB_ResidenceData.rooms[0];
- //}
- btnFoorDownIcon = new Button()
- {
- Width = Application.GetMinRealAverage(16),
- Height = Application.GetMinRealAverage(16),
- X = Application.GetRealWidth(16),
- Y = Application.GetRealHeight(18),
- UnSelectedImagePath = "Public/DownIcon.png",
- };
- contentView.AddChidren(btnFoorDownIcon);
+// #region 鎴块棿椤堕儴鍒囨崲鏄剧ず鍖哄煙
+// room = new Room() { roomName = Language.StringByID(StringId.All)};
+// btnFoorDownIcon = new Button()
+// {
+// Width = Application.GetMinRealAverage(16),
+// Height = Application.GetMinRealAverage(16),
+// X = Application.GetRealWidth(16),
+// Y = Application.GetRealHeight(18),
+// UnSelectedImagePath = "Public/DownIcon.png",
+// };
+// contentView.AddChidren(btnFoorDownIcon);
- btnRoom = new Button()
- {
- X = btnFoorDownIcon.Right,
- Y = Application.GetRealHeight(18),
- Width = Application.GetRealWidth(200),
- Height = Application.GetMinRealAverage(16),
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextAlignment = TextAlignment.CenterLeft,
- Text = room.roomName,
- };
- contentView.AddChidren(btnRoom);
+// btnRoom = new Button()
+// {
+// X = btnFoorDownIcon.Right,
+// Y = Application.GetRealHeight(18),
+// Width = Application.GetRealWidth(200),
+// Height = Application.GetMinRealAverage(16),
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+// TextAlignment = TextAlignment.CenterLeft,
+// Text = room.roomName,
+// };
+// contentView.AddChidren(btnRoom);
- btnRoomClickRow = new Button()
- {
- Height = Application.GetRealHeight(40),
- };
- contentView.AddChidren(btnRoomClickRow);
+// btnRoomClickRow = new Button()
+// {
+// Height = Application.GetRealHeight(40),
+// };
+// contentView.AddChidren(btnRoomClickRow);
- #endregion
+// #endregion
- sensorListView = new FrameLayout()
- {
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(50),
- Width = Application.GetRealWidth(308),
- Height = Application.GetRealHeight(456),
- Radius = (uint)Application.GetRealWidth(12),
- BorderColor = 0x00000000,
- BorderWidth = 0,
- };
- contentView.AddChidren(sensorListView);
+// sensorListView = new FrameLayout()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Y = Application.GetRealHeight(50),
+// Width = Application.GetRealWidth(308),
+// Height = Application.GetRealHeight(456),
+// Radius = (uint)Application.GetRealWidth(12),
+// BorderColor = 0x00000000,
+// BorderWidth = 0,
+// };
+// contentView.AddChidren(sensorListView);
- LoadSenesorList();
+// LoadSenesorList();
- LoadEventList();
+// LoadEventList();
- #endregion
+// #endregion
- //LoadEventList();
- LoadDialog_ChangeRoom();
+// //LoadEventList();
+// LoadDialog_ChangeRoom();
- new TopViewDiv(bodyView, Language.StringByID(StringId.EnvironmentalScience)).LoadTopView();
+// new TopViewDiv(bodyView, Language.StringByID(StringId.EnvironmentalScience)).LoadTopView();
- }
+// }
- /// <summary>
- /// 鍔犺浇浼犳劅鍣ㄥ垪琛�
- /// </summary>
- void LoadSenesorList()
- {
- sensorListView.RemoveAll();
- int index = 0;
- foreach (var sensor in DB_ResidenceData.functionList.sensorsEnvironmentalScience)
- {
- LoadSensorDiv(sensor, index);
- index++;
- }
- }
+// /// <summary>
+// /// 鍔犺浇浼犳劅鍣ㄥ垪琛�
+// /// </summary>
+// void LoadSenesorList()
+// {
+// sensorListView.RemoveAll();
+// int index = 0;
+// foreach (var sensor in FunctionList.List.GetEnvirSensorsList())
+// {
+// LoadSensorDiv(sensor, index);
+// index++;
+// }
+// }
- /// <summary>
- /// 鍔犺浇浼犳劅鍣ㄥ垪琛�
- /// </summary>
- void LoadSensorDiv(Sensor sensor,int index)
- {
- if (room.roomId == "" || sensor.roomIds.Contains(room.roomId))
- {
- var sensorTag = sensor.sid;
- if (sensor.bus_Data != null)
- {
- sensorTag = ((int)sensor.functionType % 256) + "_" + sensor.bus_Data.SubnetID + "_" + sensor.bus_Data.DeviceID + "_" + sensor.bus_Data.loopId;
- }
- FrameLayout sensorView = new FrameLayout()
- {
- Width = Application.GetRealWidth(148),
- Height = Application.GetRealWidth(80),
- Radius = (uint)Application.GetRealWidth(8),
- BorderColor = 0x00000000,
- BorderWidth = 0,
- BackgroundColor = CSS_Color.MainBackgroundColor,
- Y = Application.GetRealWidth(92 * (index / 2)),
- Tag = sensorTag
- };
- if (index % 2 != 0)
- {
- sensorView.X = Application.GetRealWidth(160);
- }
- sensorListView.AddChidren(sensorView);
+// /// <summary>
+// /// 鍔犺浇浼犳劅鍣ㄥ垪琛�
+// /// </summary>
+// void LoadSensorDiv(Function sensor,int index)
+// {
+// var levelColorList = sensorTemp.GetLevelColorList(sensor.spk);
+// var levelTextList = sensorTemp.GetLevelTextList(sensor.spk);
- var arcBar = new DiyArcSeekBar()
- {
- X = Application.GetRealWidth(7),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(48),
- Height = Application.GetRealWidth(48),
- OpenAngle = 10,
- ProgressBarColor = sensor.levelColorList[sensor.curLevel - 1],
- MinValue = 0,
- MaxValue = 96,
- Progress = (96 / sensor.levelColorList.Count) * sensor.curLevel,
- IsClickable = false,
- ArcColor = CSS_Color.BackgroundColor,
- ArcWidth = Application.GetRealWidth(4),
- IsThumbImgBtnShow = false,
- SeekBarPadding = Application.GetRealWidth(2),
- };
- sensorView.AddChidren(arcBar);
+// if (room.roomId == "" || sensor.roomIds.Contains(room.roomId))
+// {
+// var sensorTag = sensor.sid;
+// FrameLayout sensorView = new FrameLayout()
+// {
+// Width = Application.GetRealWidth(148),
+// Height = Application.GetRealWidth(80),
+// Radius = (uint)Application.GetRealWidth(8),
+// BorderColor = 0x00000000,
+// BorderWidth = 0,
+// BackgroundColor = CSS_Color.MainBackgroundColor,
+// Y = Application.GetRealWidth(92 * (index / 2)),
+// Tag = sensorTag
+// };
+// if (index % 2 != 0)
+// {
+// sensorView.X = Application.GetRealWidth(160);
+// }
+// sensorListView.AddChidren(sensorView);
- var btnSensorTitle = new Button()
- {
- X = Application.GetRealWidth(7),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(48),
- Height = Application.GetRealWidth(48),
- TextAlignment = TextAlignment.Center,
- TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextID = sensor.functionTypeNameId,
- Tag = "SensorTitle"
- };
- sensorView.AddChidren(btnSensorTitle);
- btnSensorTitle.MouseUpEventHandler = (sender, e) => {
- var esp = new EnvironmentalSensorPage(sensor);
- MainPage.BasePageView.AddChidren(esp);
- esp.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- };
+// var arcBar = new DiyArcSeekBar()
+// {
+// X = Application.GetRealWidth(7),
+// Gravity = Gravity.CenterVertical,
+// Width = Application.GetRealWidth(48),
+// Height = Application.GetRealWidth(48),
+// OpenAngle = 10,
+// ProgressBarColor = sensorTemp.GetLevelColorList(sensor.spk)[sensorTemp.GetCurLevel(sensor) - 1],
+// MinValue = 0,
+// MaxValue = 96,
+// Progress = (96 / sensorTemp.GetLevelColorList(sensor.spk).Count * sensorTemp.GetCurLevel(sensor)),
+// IsClickable = false,
+// ArcColor = CSS_Color.BackgroundColor,
+// ArcWidth = Application.GetRealWidth(4),
+// IsThumbImgBtnShow = false,
+// SeekBarPadding = Application.GetRealWidth(2),
+// };
+// sensorView.AddChidren(arcBar);
- var btnInfoIcon = new Button()
- {
- X = Application.GetRealWidth(120),
- Width = Application.GetRealWidth(28),
- Height = Application.GetRealWidth(28),
- UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/TipInfoIcon.png",
- };
- sensorView.AddChidren(btnInfoIcon);
- btnInfoIcon.MouseUpEventHandler = (sender, e) =>
- {
- LoadInfo(sensor);
- };
+// var btnSensorTitle = new Button()
+// {
+// X = Application.GetRealWidth(7),
+// Gravity = Gravity.CenterVertical,
+// Width = Application.GetRealWidth(48),
+// Height = Application.GetRealWidth(48),
+// TextAlignment = TextAlignment.Center,
+// TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// TextID = sensorTemp.GetFunctionTypeNameId(sensor.spk),
+// Tag = "SensorTitle"
+// };
+// sensorView.AddChidren(btnSensorTitle);
+// btnSensorTitle.MouseUpEventHandler = (sender, e) => {
+// #region
+// var esp = new EnvironmentalSensorPage(sensor);
+// MainPage.BasePageView.AddChidren(esp);
+// esp.LoadPage();
+// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+// #endregion
+// };
- var btnSensorValues = new Button()
- {
- X = Application.GetRealWidth(72),
- Y = Application.GetRealWidth(17),
- Width = Application.GetRealWidth(70),
- Height = Application.GetRealWidth(30),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.EmphasisFontSize_Secondary,
- IsBold = true,
- Text = sensor.values.ToString(),
- Tag = "SensorValues"
- };
- sensorView.AddChidren(btnSensorValues);
+// var btnInfoIcon = new Button()
+// {
+// X = Application.GetRealWidth(120),
+// Width = Application.GetRealWidth(28),
+// Height = Application.GetRealWidth(28),
+// UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/TipInfoIcon.png",
+// };
+// sensorView.AddChidren(btnInfoIcon);
+// btnInfoIcon.MouseUpEventHandler = (sender, e) =>
+// {
+// LoadInfo(sensor);
+// };
- var btnLevel = new Button()
- {
- X = Application.GetRealWidth(70),
- Y = btnSensorValues.Bottom,
- Width = Application.GetRealWidth(50),
- Height = Application.GetRealWidth(18),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = sensor.levelColorList[sensor.curLevel - 1],
- TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
- TextID = sensor.levelTextList[sensor.curLevel - 1],
- Tag = "SensorLevel"
- };
- sensorView.AddChidren(btnLevel);
+// var btnSensorValues = new Button()
+// {
+// X = Application.GetRealWidth(72),
+// Y = Application.GetRealWidth(17),
+// Width = Application.GetRealWidth(70),
+// Height = Application.GetRealWidth(30),
+// TextAlignment = TextAlignment.CenterLeft,
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// TextSize = CSS_FontSize.EmphasisFontSize_Secondary,
+// IsBold = true,
+// Text = sensor.GetAttrState(FunctionAttributeKey.Value),
+// Tag = "SensorValues"
+// };
+// sensorView.AddChidren(btnSensorValues);
- Control.Ins.SendReadCommand(sensor);
- }
- }
+// var btnLevel = new Button()
+// {
+// X = Application.GetRealWidth(70),
+// Y = btnSensorValues.Bottom,
+// Width = Application.GetRealWidth(50),
+// Height = Application.GetRealWidth(18),
+// TextAlignment = TextAlignment.CenterLeft,
+// TextColor = levelColorList[sensorTemp.GetCurLevel( sensor) - 1],
+// TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
+// TextID = levelTextList[sensorTemp.GetCurLevel(sensor) - 1],
+// Tag = "SensorLevel"
+// };
+// sensorView.AddChidren(btnLevel);
- /// <summary>
- /// 鍔犺浇浼犳劅鍣ㄧ瓑绾х浉鍏充俊鎭�
- /// </summary>
- void LoadInfo(Sensor sensor)
- {
- Dialog dialog = new Dialog();
+// Control.Ins.SendReadCommand(sensor);
+// }
+// }
- FrameLayout dialogBodyView = new FrameLayout();
- dialog.AddChidren(dialogBodyView);
- dialogBodyView.MouseUpEventHandler = (sender, e) =>
- {
- dialog.Close();
- };
+// /// <summary>
+// /// 鍔犺浇浼犳劅鍣ㄧ瓑绾х浉鍏充俊鎭�
+// /// </summary>
+// void LoadInfo(Function sensor)
+// {
+// var levelColorList = sensorTemp.GetLevelColorList(sensor.spk);
+// var levelTextList = sensorTemp.GetLevelTextList(sensor.spk);
+// Dialog dialog = new Dialog();
- VerticalScrolViewLayout infoView = new VerticalScrolViewLayout()
- {
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(667 - 94 - (sensor.levelColorList.Count * 44) - 20),
- Width = Application.GetRealWidth(343),
- Height = Application.GetRealHeight(94 + (sensor.levelColorList.Count * 44) + sensor.levelColorList.Count),
- Radius = (uint)Application.GetRealWidth(12),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- Animate = Animate.DownToUp,
- ScrollEnabled = false,
- AnimateSpeed = 0.3f,
- };
- dialogBodyView.AddChidren(infoView);
+// FrameLayout dialogBodyView = new FrameLayout();
+// dialog.AddChidren(dialogBodyView);
+// dialogBodyView.MouseUpEventHandler = (sender, e) =>
+// {
+// dialog.Close();
+// };
+// VerticalScrolViewLayout infoView = new VerticalScrolViewLayout()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Y = Application.GetRealHeight(667 - 94 - (levelColorList.Count * 44) - 20),
+// Width = Application.GetRealWidth(343),
+// Height = Application.GetRealHeight(94 + (levelColorList.Count * 44) + levelColorList.Count),
+// Radius = (uint)Application.GetRealWidth(12),
+// BackgroundColor = CSS_Color.MainBackgroundColor,
+// Animate = Animate.DownToUp,
+// ScrollEnabled = false,
+// AnimateSpeed = 0.3f,
+// };
+// dialogBodyView.AddChidren(infoView);
- Button btnTitle = new Button()
- {
- Height = Application.GetRealHeight(50),
- TextColor = CSS_Color.FirstLevelTitleColor,
- IsBold = true,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextAlignment = TextAlignment.Center,
- };
- infoView.AddChidren(btnTitle);
+// Button btnTitle = new Button()
+// {
+// Height = Application.GetRealHeight(50),
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// IsBold = true,
+// TextSize = CSS_FontSize.SubheadingFontSize,
+// TextAlignment = TextAlignment.Center,
+// };
+// infoView.AddChidren(btnTitle);
- switch (sensor.functionType)
- {
- case FunctionType.PM25:
- btnTitle.Text = "PM2.5(ug/m虏)";
- break;
- case FunctionType.Temp:
- btnTitle.Text = Language.StringByID(StringId.Temp) + "(掳C)";
- break;
- case FunctionType.TVOC:
- btnTitle.Text = "TVOC(PPM)";
- break;
- case FunctionType.CO2:
- btnTitle.Text = "CO2(PPM)";
- break;
- case FunctionType.Humidity:
- btnTitle.Text = Language.StringByID(StringId.Humidity) + "(%)";
- break;
- }
+// switch (sensor.spk)
+// {
+// case SPK.SensorPm25:
+// btnTitle.Text = "PM2.5(ug/m虏)";
+// break;
+// case SPK.SensorTemperature:
+// btnTitle.Text = Language.StringByID(StringId.Temp) + "(掳C)";
+// break;
+// case SPK.SensorTVOC:
+// btnTitle.Text = "TVOC(PPM)";
+// break;
+// case SPK.SensorCO2:
+// btnTitle.Text = "CO2(PPM)";
+// break;
+// case SPK.SensorHumidity:
+// btnTitle.Text = Language.StringByID(StringId.Humidity) + "(%)";
+// break;
+// }
- FrameLayout subTitleView = new FrameLayout()
- {
- Height = Application.GetRealHeight(44),
- };
- infoView.AddChidren(subTitleView);
+// FrameLayout subTitleView = new FrameLayout()
+// {
+// Height = Application.GetRealHeight(44),
+// };
+// infoView.AddChidren(subTitleView);
- subTitleView.AddChidren(new Button()
- {
- X = Application.GetRealWidth(20),
- Width = Application.GetRealWidth(100),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- IsBold = true,
- TextID = StringId.IntervalValue,
- });
+// subTitleView.AddChidren(new Button()
+// {
+// X = Application.GetRealWidth(20),
+// Width = Application.GetRealWidth(100),
+// TextAlignment = TextAlignment.CenterLeft,
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// TextSize = CSS_FontSize.TextFontSize,
+// IsBold = true,
+// TextID = StringId.IntervalValue,
+// });
- subTitleView.AddChidren(new Button()
- {
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(100),
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- IsBold = true,
- TextID = StringId.LevelSensor,
- });
+// subTitleView.AddChidren(new Button()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Width = Application.GetRealWidth(100),
+// TextAlignment = TextAlignment.Center,
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// TextSize = CSS_FontSize.TextFontSize,
+// IsBold = true,
+// TextID = StringId.LevelSensor,
+// });
- subTitleView.AddChidren(new Button()
- {
- X = Application.GetRealWidth(223),
- Width = Application.GetRealWidth(100),
- TextAlignment = TextAlignment.CenterRight,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- IsBold = true,
- TextID = StringId.ColorValue,
- });
- for (int index = 0; index < sensor.levelTextList.Count; index++)
- {
- infoView.AddChidren(new Button()
- {
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(303),
- Height = Application.GetRealWidth(1),
- BackgroundColor = CSS_Color.DividingLineColor,
- });
+// subTitleView.AddChidren(new Button()
+// {
+// X = Application.GetRealWidth(223),
+// Width = Application.GetRealWidth(100),
+// TextAlignment = TextAlignment.CenterRight,
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// TextSize = CSS_FontSize.TextFontSize,
+// IsBold = true,
+// TextID = StringId.ColorValue,
+// });
+// for (int index = 0; index < levelTextList.Count; index++)
+// {
+// infoView.AddChidren(new Button()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Width = Application.GetRealWidth(303),
+// Height = Application.GetRealWidth(1),
+// BackgroundColor = CSS_Color.DividingLineColor,
+// });
- FrameLayout subInfoView = new FrameLayout()
- {
- Height = Application.GetRealHeight(44),
- };
- infoView.AddChidren(subInfoView);
+// FrameLayout subInfoView = new FrameLayout()
+// {
+// Height = Application.GetRealHeight(44),
+// };
+// infoView.AddChidren(subInfoView);
- subInfoView.AddChidren(new Button()
- {
- X = Application.GetRealWidth(20),
- Width = Application.GetRealWidth(100),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- IsBold = true,
- Text = sensor.intervalValue[index]
- });
+// subInfoView.AddChidren(new Button()
+// {
+// X = Application.GetRealWidth(20),
+// Width = Application.GetRealWidth(100),
+// TextAlignment = TextAlignment.CenterLeft,
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// TextSize = CSS_FontSize.TextFontSize,
+// IsBold = true,
+// Text = sensorTemp.GetIntervalValue(sensor.spk)[index]
+// });
- subInfoView.AddChidren(new Button()
- {
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(100),
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.TextFontSize,
- IsBold = true,
- TextID = sensor.levelTextList[index]
- });
+// subInfoView.AddChidren(new Button()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Width = Application.GetRealWidth(100),
+// TextAlignment = TextAlignment.Center,
+// TextColor = CSS_Color.FirstLevelTitleColor,
+// TextSize = CSS_FontSize.TextFontSize,
+// IsBold = true,
+// TextID = levelTextList[index]
+// });
- subInfoView.AddChidren(new Button()
- {
- X = Application.GetRealWidth(285),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(38),
- Height = Application.GetRealHeight(18),
- Radius = (uint)Application.GetRealWidth(4),
- BackgroundColor = sensor.levelColorList[index]
- });
- }
+// subInfoView.AddChidren(new Button()
+// {
+// X = Application.GetRealWidth(285),
+// Gravity = Gravity.CenterVertical,
+// Width = Application.GetRealWidth(38),
+// Height = Application.GetRealHeight(18),
+// Radius = (uint)Application.GetRealWidth(4),
+// BackgroundColor = levelColorList[index]
+// });
+// }
- dialog.Show();
- }
+// dialog.Show();
+// }
- /// <summary>
- /// 鎴块棿鍒楄〃鐐瑰嚮浜嬩欢
- /// </summary>
- void LoadDialog_ChangeRoom()
- {
- EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
- var dialog = new Dialog();
- var dialogBody = new FrameLayout();
- dialog.AddChidren(dialogBody);
- dialogBody.MouseUpEventHandler += (sender1, e1) => {
- dialog.Close();
- };
+// /// <summary>
+// /// 鎴块棿鍒楄〃鐐瑰嚮浜嬩欢
+// /// </summary>
+// void LoadDialog_ChangeRoom()
+// {
+// EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
+// var dialog = new Dialog();
+// var dialogBody = new FrameLayout();
+// dialog.AddChidren(dialogBody);
+// dialogBody.MouseUpEventHandler += (sender1, e1) => {
+// dialog.Close();
+// };
- var dispalyView = new FrameLayout()
- {
- X = Application.GetRealWidth(10),
- Y = Application.GetRealHeight(266),
- Width = Application.GetRealWidth(160),
- Height = Application.GetRealHeight(110),
- BackgroundImagePath = "PersonalCenter/HomeList1bg.png",
- };
- dialogBody.AddChidren(dispalyView);
+// var dispalyView = new FrameLayout()
+// {
+// X = Application.GetRealWidth(10),
+// Y = Application.GetRealHeight(266),
+// Width = Application.GetRealWidth(160),
+// Height = Application.GetRealHeight(110),
+// BackgroundImagePath = "PersonalCenter/HomeList1bg.png",
+// };
+// dialogBody.AddChidren(dispalyView);
- var contentView = new VerticalScrolViewLayout()
- {
- X = Application.GetRealWidth(8),
- Y = Application.GetRealHeight(15),
- Width = Application.GetRealWidth(150),
- Height = Application.GetRealHeight(45 * 2),
- ScrollEnabled = false
- };
- dispalyView.AddChidren(contentView);
+// var contentView = new VerticalScrolViewLayout()
+// {
+// X = Application.GetRealWidth(8),
+// Y = Application.GetRealHeight(15),
+// Width = Application.GetRealWidth(150),
+// Height = Application.GetRealHeight(45 * 2),
+// ScrollEnabled = false
+// };
+// dispalyView.AddChidren(contentView);
- if (DB_ResidenceData.residenceData.Rooms.Count < 2)
- {
- }
- else if (DB_ResidenceData.residenceData.Rooms.Count < 3)
- {
- dispalyView = new FrameLayout()
- {
- X = Application.GetRealWidth(10),
- Y = Application.GetRealHeight(266),
- Width = Application.GetRealWidth(160),
- Height = Application.GetRealHeight(155),
- BackgroundImagePath = "PersonalCenter/HomeList2bg.png",
- };
- dialogBody.AddChidren(dispalyView);
+// if (SpatialInfo.CurrentSpatial.RoomList.Count < 2)
+// {
+// }
+// else if (SpatialInfo.CurrentSpatial.RoomList.Count < 3)
+// {
+// dispalyView = new FrameLayout()
+// {
+// X = Application.GetRealWidth(10),
+// Y = Application.GetRealHeight(266),
+// Width = Application.GetRealWidth(160),
+// Height = Application.GetRealHeight(155),
+// BackgroundImagePath = "PersonalCenter/HomeList2bg.png",
+// };
+// dialogBody.AddChidren(dispalyView);
- contentView.Height = Application.GetRealHeight(45 * 3);
- dispalyView.AddChidren(contentView);
- }
- else if (DB_ResidenceData.residenceData.Rooms.Count < 4)
- {
- dispalyView = new FrameLayout()
- {
- X = Application.GetRealWidth(10),
- Y = Application.GetRealHeight(266),
- Width = Application.GetRealWidth(160),
- Height = Application.GetRealHeight(200),
- BackgroundImagePath = "PersonalCenter/HomeList3bg.png",
- };
- dialogBody.AddChidren(dispalyView);
+// contentView.Height = Application.GetRealHeight(45 * 3);
+// dispalyView.AddChidren(contentView);
+// }
+// else if (SpatialInfo.CurrentSpatial.RoomList.Count < 4)
+// {
+// dispalyView = new FrameLayout()
+// {
+// X = Application.GetRealWidth(10),
+// Y = Application.GetRealHeight(266),
+// Width = Application.GetRealWidth(160),
+// Height = Application.GetRealHeight(200),
+// BackgroundImagePath = "PersonalCenter/HomeList3bg.png",
+// };
+// dialogBody.AddChidren(dispalyView);
- contentView.Height = Application.GetRealHeight(45 * 4);
- dispalyView.AddChidren(contentView);
- }
- else
- {
- dispalyView = new FrameLayout()
- {
- X = Application.GetRealWidth(10),
- Y = Application.GetRealHeight(266),
- Width = Application.GetRealWidth(160),
- Height = Application.GetRealHeight(245),
- BackgroundImagePath = "PersonalCenter/HomeList4bg.png",
- };
- dialogBody.AddChidren(dispalyView);
+// contentView.Height = Application.GetRealHeight(45 * 4);
+// dispalyView.AddChidren(contentView);
+// }
+// else
+// {
+// dispalyView = new FrameLayout()
+// {
+// X = Application.GetRealWidth(10),
+// Y = Application.GetRealHeight(266),
+// Width = Application.GetRealWidth(160),
+// Height = Application.GetRealHeight(245),
+// BackgroundImagePath = "PersonalCenter/HomeList4bg.png",
+// };
+// dialogBody.AddChidren(dispalyView);
- contentView.Height = Application.GetRealHeight(45 * 5);
- contentView.ScrollEnabled = true;
- dispalyView.AddChidren(contentView);
- }
+// contentView.Height = Application.GetRealHeight(45 * 5);
+// contentView.ScrollEnabled = true;
+// dispalyView.AddChidren(contentView);
+// }
- var showListRoom = new List<Room>();
- showListRoom.Add(new Room() { roomName = Language.StringByID(StringId.All) });
- showListRoom.AddRange(DB_ResidenceData.residenceData.Rooms);
+// var showListRoom = new List<Room>();
+// showListRoom.Add(new Room() { roomName = Language.StringByID(StringId.All) });
+// showListRoom.AddRange(SpatialInfo.CurrentSpatial.RoomList);
- foreach (var roomTemp in showListRoom)
- {
- string roomName = roomTemp.roomName;
- var btnRoomName = new Button()
- {
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(112),
- Height = Application.GetRealHeight(44),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS.CSS_Color.FirstLevelTitleColor,
- SelectedTextColor = CSS.CSS_Color.MainColor,
- Text = roomName,
- TextSize = CSS.CSS_FontSize.SubheadingFontSize,
- IsSelected = btnRoom.Text == roomName,
- IsMoreLines = true,
- Tag = roomName
- };
- contentView.AddChidren(btnRoomName);
+// foreach (var roomTemp in showListRoom)
+// {
+// string roomName = roomTemp.roomName;
+// var btnRoomName = new Button()
+// {
+// Gravity = Gravity.CenterHorizontal,
+// Width = Application.GetRealWidth(112),
+// Height = Application.GetRealHeight(44),
+// TextAlignment = TextAlignment.CenterLeft,
+// TextColor = CSS.CSS_Color.FirstLevelTitleColor,
+// SelectedTextColor = CSS.CSS_Color.MainColor,
+// Text = roomName,
+// TextSize = CSS.CSS_FontSize.SubheadingFontSize,
+// IsSelected = btnRoom.Text == roomName,
+// IsMoreLines = true,
+// Tag = roomName
+// };
+// contentView.AddChidren(btnRoomName);
- btnRoomName.MouseUpEventHandler += (senderH, en) =>
- {
- dialog.Close();
- btnRoom.Text = roomName;
- room = roomTemp;
- LoadSenesorList();
- };
- }
+// btnRoomName.MouseUpEventHandler += (senderH, en) =>
+// {
+// dialog.Close();
+// btnRoom.Text = roomName;
+// room = roomTemp;
+// LoadSenesorList();
+// };
+// }
- dialog.Show();
- };
+// dialog.Show();
+// };
- btnRoomClickRow.MouseUpEventHandler = eventHandler;
- //btnFoorDownIcon.MouseUpEventHandler = eventHandler;
- }
+// btnRoomClickRow.MouseUpEventHandler = eventHandler;
+// //btnFoorDownIcon.MouseUpEventHandler = eventHandler;
+// }
- }
-}
+// }
+//}
--
Gitblit v1.8.0