From 19397c2a95efa904cccaf299363dc0111af28042 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 07 八月 2023 19:47:53 +0800
Subject: [PATCH] 2023年08月07日19:47:43
---
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs | 98 +++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 91 insertions(+), 7 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
index ee921ce..a073cc9 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
@@ -156,6 +156,83 @@
}
/// <summary>
+ /// 澶氶�夋嫨
+ /// </summary>
+ /// <param name="frameLayout">鐖舵帶浠�</param>
+ /// <param name="list">鏄剧ず鏁版嵁婧�</param>
+ /// <param name="titleText"></param>
+ /// <param name="stateTextList">涔嬪墠鐘舵�佹枃鏈�</param>
+ /// <param name="action">杩斿洖绱㈠紩鍊煎垪琛�</param>
+ /// <param name="textSize">鏄剧ず鏂囨湰瀛椾綋澶у皬</param>
+ public void MultiSelectShow(FrameLayout frameLayout, List<Face> list, string titleText, string stateTexts, Action<List<int>> action, int textSize = LogicView.TextSize.text14)
+ {
+ LogicView.DateView view = new LogicView.DateView();
+ view.btnTitle.Text = titleText;
+ view.FLayoutView(frameLayout, list.Count);
+ view.btnCancel.MouseUpEventHandler += (sender, e) =>
+ {
+ //绉婚櫎fLayout鐣岄潰
+ view.frameLayout.RemoveFromParent();
+ };
+ List<int> intList = new List<int>();
+ for (int i = 0; i < list.Count; i++)
+ {
+ var face= list[i];
+ LogicView.CheckView checkView = new LogicView.CheckView();
+ checkView.frameLayout.Y = Application.GetRealHeight(56 + 50 * i);
+ checkView.btnText.TextSize = textSize;
+ view.frameLayout.AddChidren(checkView.FLayoutView());
+ checkView.btnText.Text = face.userName;
+ checkView.btnClick.Tag = i;//鏍囪
+
+ if (stateTexts.Contains(face.userId))
+ {
+ //鏄剧ず涔嬪墠鐨勯�変腑鐘舵��
+ checkView.btnCheckIcon.IsSelected = true;
+ intList.Add(i);
+ }
+ //鐐瑰嚮浜嬩欢
+ checkView.btnClick.MouseUpEventHandler += (sender1, e1) =>
+ {
+
+ int clickIndex =int.Parse(checkView.btnClick.Tag.ToString());
+ checkView.btnClick.IsSelected = !checkView.btnClick.IsSelected;
+ if (checkView.btnClick.IsSelected)
+ {
+ checkView.btnCheckIcon.IsSelected = true;
+ if (!intList.Contains(clickIndex))
+ {
+ //娣诲姞閫変腑鏁版嵁
+ intList.Add(clickIndex);
+ }
+ }
+ else
+ {
+ checkView.btnCheckIcon.IsSelected = false;
+ if (intList.Contains(clickIndex))
+ {
+ //绉婚櫎閫変腑鏁版嵁
+ intList.Remove(clickIndex);
+ }
+ }
+
+ };
+
+ }
+ view.btnConfirm.MouseUpEventHandler += (sender1, e1) =>
+ {
+ if (intList.Count == 0)
+ {
+ return;
+ }
+ action(intList);
+ //绉婚櫎fLayout鐣岄潰
+ view.frameLayout.RemoveFromParent();
+ };
+
+ }
+
+ /// <summary>
/// 鏈�-澶氶�夋嫨
/// </summary>
/// <param name="frameLayout">鐖舵帶浠�</param>
@@ -261,9 +338,10 @@
/// </summary>
/// <param name="frame">鏄剧ず鍦ㄥ摢涓晫闈㈢殑鐖舵帶浠�</param>
/// <param name="list">鏄剧ず鏁版嵁婧�</param>
+ /// <param name="stateList">涔嬪墠鐘舵�佹暟鎹簮</param>
/// <param name="titleText">鏍囬</param>
/// <param name="action">杩斿洖鍊肩储寮曞��</param>
- public void FrameOrVv(FrameLayout frame, List<string> list, List<string> stateList, int titleText, Action<int> action)
+ public void FrameOrVv(FrameLayout frame, List<string> list, List<string> stateList, string titleText, Action<int> action,bool isIcon=true)
{
int line = 0;
@@ -284,7 +362,7 @@
frame.AddChidren(frameLayout);
LogicView.DateView view = new LogicView.DateView();
- view.btnTitle.TextID = titleText;
+ view.btnTitle.Text = titleText;
view.FLayoutView(frameLayout, line);
view.btnCancel.MouseUpEventHandler += (sender, e) =>
{
@@ -310,7 +388,7 @@
verticalRefresh.EndHeaderRefreshing();
};
- if (list.Count == 0)
+ if (list.Count == 0&&isIcon)
{
Button btnTipNot = new Button
{
@@ -367,12 +445,18 @@
verticalRefresh.AddChidren(checkView.FLayoutView());
}
- if (stateList.Contains(strName))
- {
- checkView.btnCheckIcon.IsSelected = true;
- }
checkView.btnText.Text = strName;
checkView.btnClick.Tag = i;//鏍囪
+
+ if (stateList.Contains(strName))
+ {
+ //checkView.btnCheckIcon.IsSelected = true;
+
+ checkBtn.IsSelected = false;
+ checkView.btnCheckIcon.IsSelected = true;
+ checkBtn = checkView.btnCheckIcon;
+ checkBtn.Tag = checkView.btnClick.Tag.ToString();
+ }
//鐐瑰嚮浜嬩欢
checkView.btnClick.MouseUpEventHandler += (sender1, e1) =>
{
--
Gitblit v1.8.0