From c1d681f496f2e1c53f88472d803e3c95fab521af Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期四, 29 七月 2021 09:46:16 +0800
Subject: [PATCH] 萤石测试通过
---
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 131 +++++++++++++++++++------------------------
1 files changed, 57 insertions(+), 74 deletions(-)
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 214f4d8..3accadc 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -240,25 +240,23 @@
//澶у浘鏄剧ず
if (OnAppConfig.Instance.IsShowBigPicture)
{
- LoadBigPirtureRoomRow(roomView, roomsShowed[i/2]);
+ LoadBigPirtureRoomRow(roomView, roomsShowed[i]);
}
else//鏃犲浘鏄剧ず
{
- LoadSmallPirtureRoomRow(roomView, roomsShowed[i/2]);
+ LoadSmallPirtureRoomRow(roomView, roomsShowed[i]);
}
}
-
new System.Threading.Thread(() =>
{
//闇�瑕佺Щ鍔ㄧ殑楂樺害
- var runHeight = Application.GetRealWidth(i / 2 * 142);
+ var runHeight = Application.GetRealWidth(i * 142);
int runCount = 0;
//寰幆娆℃暟锛屽姩鐢绘晥鏋滈渶瑕佸湪1绉� 锛�10娆★級鍐呭畬鎴�
- while (runCount == 9)
+ while (runCount < 9)
{
- System.Threading.Thread.Sleep(100);
Application.RunOnMainThread(() =>
{
if (childView.GetType() == typeof(FrameLayout))
@@ -267,10 +265,11 @@
}
if (i > 0)
{
- childView.Y += runDirection * Application.GetRealWidth(14 * i / 2);
+ childView.Y += runDirection * Application.GetRealWidth(14 * i);
}
});
runCount++;
+ System.Threading.Thread.Sleep(12);
}
Application.RunOnMainThread(() =>
{
@@ -280,48 +279,16 @@
{
if (runDirection == 1)
{
- childView.Height = Application.GetRealWidth(192);
+ childView.Height = Application.GetRealWidth(192+20);
}
else
{
- childView.Height = Application.GetRealWidth(70);
+ childView.Height = Application.GetRealWidth(70+20);
}
}
});
})
{ IsBackground = true, Priority = System.Threading.ThreadPriority.Highest }.Start();
-
- //if (childView.GetType() == typeof(Button))
- //{
- // new System.Threading.Thread(() => {
- // //寰幆娆℃暟锛屽姩鐢绘晥鏋滈渶瑕佸湪1绉� 锛�10娆★級鍐呭畬鎴�
- // int runCount = 9;
- // //闇�瑕佺Щ鍔ㄧ殑楂樺害
- // var runHeight = i / 2 * Application.GetRealWidth(142);
-
- // while (runCount == 0)
- // {
- // System.Threading.Thread.Sleep(100);
- // Application.RunOnMainThread(() =>
- // {
- // childView.Height += Application.GetRealWidth(14) * runDirection;
- // });
- // }
- // Application.RunOnMainThread(() =>
- // {
- // if (runDirection == 1)
- // {
- // childView.Height = Application.GetRealWidth(192 + 20);
- // }
- // else
- // {
- // childView.Height = Application.GetRealWidth(70 + 20);
- // }
- // });
- // })
- // { IsBackground = true, Priority = System.Threading.ThreadPriority.Highest }.Start();
- //}
-
}
}
else
@@ -340,6 +307,7 @@
Height = Application.GetRealWidth(192 + 20),//2020-12-01 鎴块棿鍥剧墖姣斾緥鏀瑰洖16:9
Radius = (uint)Application.GetRealWidth(12),
Tag = room.roomId,
+ BackgroundColor = CSS_Color.MainBackgroundColor,
};
roomListView.AddChidren(roomView);
@@ -356,7 +324,7 @@
Height = Application.GetRealWidth(70 + 20),
Radius = (uint)Application.GetRealWidth(12),
Tag = room.roomId,
- BackgroundColor = CSS_Color.BackgroundColor,
+ BackgroundColor = CSS_Color.MainBackgroundColor,
};
roomListView.AddChidren(roomView);
LoadSmallPirtureRoomRow(roomView, room);
@@ -374,7 +342,7 @@
{
roomView.RemoveAll();
roomFloorChangeView.BackgroundColor = roomListView.BackgroundColor = CSS_Color.MainBackgroundColor;
-
+ roomView.BackgroundColor = CSS_Color.MainBackgroundColor;
var roomViewbg = new ImageView()
{
Width = Application.GetRealWidth(343),
@@ -481,6 +449,7 @@
var roomViewbgColor = new Button()
{
+ Height = Application.GetRealWidth(192),
Radius = (uint)Application.GetRealWidth(12),
BackgroundColor = 0x19333333,
};
@@ -499,13 +468,13 @@
roomView.AddChidren(btnAllClose);
LoadEvent_CloseAllFunction(btnAllClose, room);
- var btn = new Button()
- {
- Y = Application.GetRealWidth(192),
- Height = Application.GetRealWidth(20),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- };
- roomView.AddChidren(btn);
+ //var btn = new Button()
+ //{
+ // Y = Application.GetRealWidth(192),
+ // Height = Application.GetRealWidth(20),
+ // BackgroundColor = CSS_Color.MainBackgroundColor,
+ //};
+ //roomView.AddChidren(btn);
roomViewbgColor.MouseUpEventHandler += (sender, e) =>
{
@@ -540,11 +509,23 @@
{
roomView.RemoveAll();
roomFloorChangeView.BackgroundColor = roomListView.BackgroundColor = CSS_Color.BackgroundColor;
+ roomView.BackgroundColor = CSS_Color.BackgroundColor;
+ //roomView.BackgroundColor = CSS_Color.MainBackgroundColor;
+
+
+ var viewbg = new Button()
+ {
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealWidth(70),
+ Radius = (uint)Application.GetRealWidth(12),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ roomView.AddChidren(viewbg);
var btnRoomName = new Button()
{
X = Application.GetRealWidth(16),
- Y = Application.GetRealHeight(12 - 2),
+ //Y = Application.GetRealHeight(12 - 2),
Width = Application.GetRealWidth(266),
Height = Application.GetRealHeight(52),
Text = room.roomName,
@@ -557,7 +538,7 @@
var btnFloorName = new Button()
{
X = Application.GetRealWidth(16),
- Y = Application.GetRealHeight(42),
+ Y = Application.GetRealHeight(19),
Width = Application.GetRealWidth(266),
Height = Application.GetRealHeight(46),
Text = room.floorName,
@@ -577,10 +558,10 @@
var btnAllClose = new Button()
{
- X = Application.GetRealWidth(288),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetMinRealAverage(58),
- Height = Application.GetMinRealAverage(58),
+ X = Application.GetRealWidth(278),
+ Y = Application.GetRealWidth(15),
+ Width = Application.GetMinRealAverage(50),
+ Height = Application.GetMinRealAverage(50),
UnSelectedImagePath = "Classification/Room/AllCloseIcon2.png",
Tag = "AllClose",
Visible = false
@@ -588,13 +569,13 @@
roomView.AddChidren(btnAllClose);
LoadEvent_CloseAllFunction(btnAllClose, room);
- var btn = new Button()
- {
- Y = Application.GetRealWidth(70),
- Height = Application.GetRealWidth(20),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- };
- roomView.AddChidren(btn);
+ //var btn = new Button()
+ //{
+ // Y = Application.GetRealWidth(70),
+ // Height = Application.GetRealWidth(20),
+ // BackgroundColor = CSS_Color.BackgroundColor,
+ //};
+ //roomView.AddChidren(btn);
roomViewbg.MouseUpEventHandler += (sender, e) =>
{
@@ -717,25 +698,27 @@
break;
case ShowFunction.FreshAir:
functionCount = FunctionList.List.GetAirFreshList().Count;
+ functionOnCount = FunctionList.List.GetAirFreshList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
break;
case ShowFunction.Music:
- functionCount = Music.A31MusicModel.A31MusicModelList.Count;
- functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
- if(functionCount == 0)
- {
- functionCount = FunctionList.List.GetMusicList().Count;
- }
+ functionCount = FunctionList.List.GetMusicList().Count;
+#if DEBUG
+ functionCount = 1;
+#endif
break;
case ShowFunction.Panel:
break;
case ShowFunction.SecurityMonitoring:
- functionCount = 1;
+ if (!MainPage.NoLoginMode)
+ {
+ functionCount = 1;
+ }
break;
case ShowFunction.Sensor:
functionCount = FunctionList.List.GetArmSensorList().Count;
break;
case ShowFunction.VideoIntercom:
- if (FunctionList.List.videoIntercom != null)
+ if (FunctionList.List.videoIntercom != null && FunctionList.List.videoIntercom.Count > 0)
{
functionCount = 1;
}
@@ -803,7 +786,7 @@
functionView.AddChidren(btnName);
if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom
- && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir
+ && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir && item != ShowFunction.Music
&& item != ShowFunction.EnergyMonitoring && item != ShowFunction.SecurityCenter
&& functionCount != 0)
{
@@ -1044,12 +1027,12 @@
btnName.TextID = StringId.Sensor;
functionPageTitleId = StringId.Sensor;
break;
- case ShowFunction.VideoIntercom:
+ case ShowFunction.VideoIntercom://鍙瀵硅
btnName.TextID = StringId.VideoIntercom;
btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
{
var videoMethod = new UI2.FuntionControlView.Video.VideoMethod();
- videoMethod.MianView(this,FunctionList.List.videoIntercom);
+ videoMethod.MianView(this);
};
break;
case ShowFunction.SecurityCenter:
--
Gitblit v1.8.0