From 05a80811c90af3f1bbde74968f41fb2b3d0471f7 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 07 六月 2023 13:47:27 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
index b108f57..a0aef90 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
@@ -194,7 +194,7 @@
/// <summary>
/// 鏄剧ず鐨勮澶囩殑鎬绘暟
/// </summary>
- int showCount = 0;
+ int showCount = -1;
/// <summary>
/// 鍔犺浇鍔熻兘row
@@ -214,18 +214,19 @@
{
if (!isAppend)
{
- showCount = 0;
+ showCount = -1;
functionListView.RemoveAll();
}
- int i = 0;
- foreach (var function in functions)
+ for(var i =0;i<100;i++)
+ //foreach (var function in functions)
{
- i++;
- if (i > 100)
+ showCount++;
+ if (showCount >= functions.Count)
{
break;
}
- showCount++;
+ var function = functions[showCount];
+
var functionDiv = new LightRow(function)
{
Gravity = Gravity.CenterHorizontal,
@@ -264,12 +265,8 @@
TextAlignment = TextAlignment.Center,
TextSize = CSS_FontSize.SubheadingFontSize,
TextColor = CSS_Color.FirstLevelTitleColor,
- Text = "鍔犺浇鏇村",
+ TextID = StringId.LoadMore,
};
- if (Language.CurrentLanguage != "Chinese")
- {
- btnAppend.Text = "Load more";
- }
functionListView.AddChidren(btnAppend);
btnAppend.MouseUpEventHandler = (sender, e) =>
{
@@ -419,11 +416,17 @@
Height = Application.GetRealWidth(32),
UnSelectedImagePath = "FunctionIcon/Light/LightScene/CheckIcon.png",
SelectedImagePath = "FunctionIcon/Light/LightScene/CheckOnIcon.png",
- IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null
+ IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null,
+ Tag = "ChooseIcon"
};
+ if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl)
+ {
+ btnSelect.X = Application.GetRealWidth(323);
+ }
bodyDiv.AddChidren(btnSelect);
btnSelect.MouseUpEventHandler = (sender, e) => {
+ Application.HideSoftInput();
btnSelect.IsSelected = !btnSelect.IsSelected;
if(btnSelect.IsSelected)
{
@@ -435,17 +438,17 @@
}
else
{
- var removeTemp = functions.Find((obj) => obj.deviceId == function.deviceId);
+ var removeTemp = functions.Find((obj) => obj.sid == function.sid);
if (removeTemp != null)
{
functions.Remove(removeTemp);
}
}
///鍒锋柊鐣岄潰
- if (functions.Count == 0 || functions.Count == 1)
- {
+ //if (functions.Count == 0 || functions.Count == 1)
+ //{
action();
- }
+ //}
};
}
--
Gitblit v1.8.0