From 01f9d2ef466c1313bc5f0e486d90db0054bcddd9 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 01 八月 2023 20:12:54 +0800
Subject: [PATCH] 2023年08月01日20:12:52
---
/dev/null | 69 ---------
HDL_ON/UI/UI2/FuntionControlView/Aks/SxqPage.cs | 133 +++++++++++++++++++
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/VerticalBoutonFLayout.cs | 178 +++++++++++++++++++++++++
HDL_ON/UI/UI2/FuntionControlView/Aks/AksMusicPage.cs | 10
HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs | 10
HDL_ON/HDL_ON.projitems | 3
7 files changed, 325 insertions(+), 80 deletions(-)
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index f7086ec..1eb232c 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -572,7 +572,8 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\MenuFramLayout.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\TypeSingleFramLayout.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\TypeMultiFramLayout.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\PayerFramLayout.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\VerticalBoutonFLayout.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\SxqPage.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksMusicPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksMusicPage.cs
index 80df87b..55d702f 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksMusicPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksMusicPage.cs
@@ -15,7 +15,7 @@
public AksMusicPage()
{
}
-
+
public Action<IntType> action;
CornerFramLayout cornerFram;
TypeSingleFramLayout typeSingleFramLayout;
@@ -73,7 +73,11 @@
typeMultiFramLayout.SetLeftFlClickListener((f) =>
{
- Console.WriteLine("3");
+ SxqPage sxqPage = new SxqPage();
+ MainPage.BasePageView.AddChidren(sxqPage);
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ sxqPage.Show();
+
});
typeMultiFramLayout.SetRightFlClickListener((f) =>
@@ -126,8 +130,6 @@
typeMultiFramLayout = new TypeMultiFramLayout();
typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32);
typeMultiFramLayout.AddView(cornerBottomFram);
-
-
this.AdjustRealHeight(20);
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
index edf4f5d..12570d9 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
@@ -49,7 +49,7 @@
/// </summary>
public Action action;
- public IntType currnetIntType;
+ public IntType currnetIntType= IntType.none;
public VerticalScrolViewLayout vv;
#endregion
@@ -189,10 +189,6 @@
/// </summary>
private void SwitchUI(IntType type)
{
- if (vv != null)
- {
- vv.RemoveAll();
- }
if (this.currnetIntType == type)
{
return;
@@ -201,6 +197,10 @@
{
return;
}
+ if (vv != null)
+ {
+ vv.RemoveAll();
+ }
this.currnetIntType = type;
switch (type)
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/PayerFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/PayerFramLayout.cs
deleted file mode 100644
index 2b48b6f..0000000
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/PayerFramLayout.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-锘縰sing System;
-using HDL_ON.UI.Music;
-using Shared;
-namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView
-{
- public class PayerFramLayout : BaseFramLayout
- {
- public FrameLayout fLayout = new FrameLayout
- {
- Width = Application.GetRealWidth(343),
- Height = Application.GetRealHeight(364),
- X = Application.GetRealWidth(16),
- BackgroundColor = MusicColor.WhiteColor,
- Radius = (uint)Application.GetRealHeight(17),
- };
-
- TypeSingleFramLayout typeSingleFramLayout = new TypeSingleFramLayout();
-
- /// <summary>
- /// 鑿滃崟瀹瑰櫒(涓婏紝涓嬶紝宸︼紝鍙筹紝ok)
- /// </summary>
- public MenuFramLayout menuFram = new MenuFramLayout();
-
- public TypeMultiFramLayout typeMultiFramLayout = new TypeMultiFramLayout();
-
- public void AddView(FrameLayout layout)
- {
- layout.AddChidren(fLayout);
- typeSingleFramLayout.singleFramLayout.Y = Application.GetRealHeight(24);
- typeSingleFramLayout.AddView(fLayout);
- menuFram.Y = typeSingleFramLayout.singleFramLayout.Bottom + Application.GetRealHeight(32);
- menuFram.AddView(fLayout);
- typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32);
- typeMultiFramLayout.AddView(fLayout);
-
- }
-
- /// <summary>
- /// 鍗曚釜瀹瑰櫒浜嬩欢
- /// </summary>
- /// <param name="action">鍥炶皟(绗竴涓槸鐖剁被瀵硅薄</param>
- public void SetSinglClickListener(Action<FrameLayout> action)
- {
- typeSingleFramLayout.SetClickListener(action);
- }
-
- /// <summary>
- /// 宸﹁竟瀹瑰櫒浜嬩欢
- /// </summary>
- /// <param name="action">鍥炶皟(绗竴涓槸鐖剁被瀵硅薄</param>
- public void SetLeftFlClickListener(Action<FrameLayout> action)
- {
-
- typeMultiFramLayout.SetLeftFlClickListener(action);
- }
-
- /// <summary>
- /// 鍙宠竟瀹瑰櫒浜嬩欢
- /// </summary>
- /// <param name="action">鍥炶皟(绗竴涓槸鐖剁被瀵硅薄</param>
- public void SetRightFlClickListener(Action<FrameLayout> action)
- {
- typeMultiFramLayout.SetRightFlClickListener(action);
- }
-
-
-
- }
-}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs
index 0400c94..ea76914 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs
@@ -3,7 +3,7 @@
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView
{
- public class TypeMultiFramLayout:BaseFramLayout
+ public class TypeMultiFramLayout
{
private uint UpBackgroundColor = 0x00000000;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/VerticalBoutonFLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/VerticalBoutonFLayout.cs
new file mode 100644
index 0000000..e8d0e83
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/VerticalBoutonFLayout.cs
@@ -0,0 +1,178 @@
+锘縰sing System;
+using HDL_ON.UI.Music;
+using Shared;
+namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView
+{
+ public class VerticalBoutonFLayout:BaseFramLayout
+ {
+
+ public const int widthFrameLayout = 80;
+ public const int heightFrameLayout = 140;
+ public const int cornerValue = 12;
+
+ public VerticalBoutonFLayout(int width = widthFrameLayout, int height = heightFrameLayout)
+ {
+ this.Width = Application.GetRealWidth(width);
+ this.Height = Application.GetRealHeight(height);
+ this.BackgroundColor = MusicColor.ViewColor;
+ Radius = (uint)Application.GetRealHeight(cornerValue);
+ }
+
+
+
+ //public FrameLayout fLayout = new FrameLayout
+ //{
+ // Y = Application.GetRealHeight(16),
+ // Width = Application.GetRealWidth(widthFrameLayout - 8),
+ // Height = Application.GetRealHeight(heightFrameLayout - 16),
+ // Radius = (uint)Application.GetRealHeight(cornerValue),
+ // BackgroundColor = MusicColor.ViewColor,
+ //};
+
+
+ public FrameLayout ONFLayout = new FrameLayout
+ {
+ Height = Application.GetRealWidth(40),
+ Width = Application.GetRealWidth(40),
+ Radius = (uint)Application.GetRealHeight(20),
+ BackgroundColor = MusicColor.WhiteColor,
+ Gravity = Gravity.CenterHorizontal,
+ };
+
+ public Button ONButton = new Button
+ {
+ Text = "ON",
+ Gravity = Gravity.Center,
+ TextColor = MusicColor.MusicTxet14SelectedColor,
+ TextSize = TextSize.Text14,
+ };
+
+ public Button btnName = new Button
+ {
+ Width = Application.GetRealWidth(widthFrameLayout),
+ Height = Application.GetRealHeight(17),
+ TextSize = TextSize.Text12,
+ TextColor = MusicColor.TextColor,
+ TextAlignment = TextAlignment.Center,
+ Gravity = Gravity.CenterHorizontal,
+ Padding = new Padding(0, 20, 0, 20),
+ IsMoreLines = true,
+ Text="none"
+ };
+
+ public FrameLayout OFFFLayout = new FrameLayout
+ {
+ Height = Application.GetRealWidth(40),
+ Width = Application.GetRealWidth(40),
+ Radius = (uint)Application.GetRealHeight(20),
+ BackgroundColor = MusicColor.WhiteColor,
+ Gravity = Gravity.CenterHorizontal,
+ };
+
+ public Button OFFButton = new Button
+ {
+ Text = "OFF",
+ Gravity = Gravity.Center,
+ TextColor = 0xFFA5AEBC,
+ TextSize = TextSize.Text14,
+ };
+
+
+ /// <summary>
+ /// 娣诲姞甯冨眬
+ /// </summary>
+ /// <param name="parent"></param>
+ public void AddView(FrameLayout parent)
+ {
+ parent.AddChidren(this);
+ //this.AddChidren(fLayout);
+ this.AddChidren(ONFLayout);
+ ONFLayout.AddChidren(ONButton);
+ this.AddChidren(btnName);
+ this.AddChidren(OFFFLayout);
+ OFFFLayout.AddChidren(OFFButton);
+
+ ONFLayout.Y = Application.GetRealHeight(11);
+ btnName.Y = ONFLayout.Bottom + Application.GetRealHeight(11);
+ OFFFLayout.Y = btnName.Bottom + Application.GetRealHeight(11);
+
+ }
+
+
+
+ /// <summary>
+ /// 浜嬩欢鐩戝惉鏂规硶
+ /// </summary>
+ /// <param name="action">鍥炶皟(绗竴涓槸鐖剁被瀵硅薄;绗簩涓槸鍥炬爣瀵硅薄</param>
+ public void SetONClickListener(Action<FrameLayout, Button> action)
+ {
+ EventHandler<MouseEventArgs> UpClick = (sender, e) =>
+ {
+ ONFLayout.BackgroundColor = MusicColor.WhiteColor;
+ ONButton.TextColor = MusicColor.MusicTxet14SelectedColor;
+
+ //寮硅捣鏉ヨ繕鍘熻儗鏅鑹�
+ };
+ ONFLayout.MouseUpEventHandler += UpClick;
+ ONButton.MouseUpEventHandler += UpClick;
+
+
+ //EventHandler<MouseEventArgs> MoveClick = (sender, e) =>
+ //{
+ // this.BackgroundColor = 0x00000000;
+ // //寮硅捣鏉ヨ繕鍘熻儗鏅鑹�
+ //};
+ //this.MouseMoveEventHandler += MoveClick;
+ //btnImage.MouseMoveEventHandler += MoveClick;
+ //btnName.MouseMoveEventHandler += MoveClick;
+
+ EventHandler<MouseEventArgs> DownClick = (sender, e) =>
+ {
+ //鎸変笅鍘绘敼鍙樿儗鏅鑹�
+ ONFLayout.BackgroundColor = MusicColor.MusicTxet14SelectedColor;
+ ONButton.TextColor = MusicColor.WhiteColor;
+ action?.Invoke(ONFLayout, ONButton);
+ };
+ ONFLayout.MouseDownEventHandler += DownClick;
+ ONButton.MouseDownEventHandler += DownClick;
+ }
+
+ /// <summary>
+ /// 浜嬩欢鐩戝惉鏂规硶
+ /// </summary>
+ /// <param name="action">鍥炶皟(绗竴涓槸鐖剁被瀵硅薄;绗簩涓槸鍥炬爣瀵硅薄</param>
+ public void SetOFFClickListener(Action<FrameLayout, Button> action)
+ {
+ EventHandler<MouseEventArgs> UpClick = (sender, e) =>
+ {
+ OFFFLayout.BackgroundColor = MusicColor.WhiteColor;
+ OFFButton.TextColor = 0xFFA5AEBC;
+
+ //寮硅捣鏉ヨ繕鍘熻儗鏅鑹�
+ };
+ OFFFLayout.MouseUpEventHandler += UpClick;
+ OFFButton.MouseUpEventHandler += UpClick;
+
+
+ //EventHandler<MouseEventArgs> MoveClick = (sender, e) =>
+ //{
+ // this.BackgroundColor = 0x00000000;
+ // //寮硅捣鏉ヨ繕鍘熻儗鏅鑹�
+ //};
+ //this.MouseMoveEventHandler += MoveClick;
+ //btnImage.MouseMoveEventHandler += MoveClick;
+ //btnName.MouseMoveEventHandler += MoveClick;
+
+ EventHandler<MouseEventArgs> DownClick = (sender, e) =>
+ {
+ //鎸変笅鍘绘敼鍙樿儗鏅鑹�
+ OFFFLayout.BackgroundColor = MusicColor.MusicTxet14SelectedColor;
+ OFFButton.TextColor = MusicColor.WhiteColor;
+ action?.Invoke(OFFFLayout, OFFButton);
+ };
+ OFFFLayout.MouseDownEventHandler += DownClick;
+ OFFButton.MouseDownEventHandler += DownClick;
+ }
+
+ }
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/SxqPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/SxqPage.cs
new file mode 100644
index 0000000..40a6fcf
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/SxqPage.cs
@@ -0,0 +1,133 @@
+锘縰sing Shared;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HDL_ON.UI.CSS;
+using HDL_ON.Entity;
+using HDL_ON.DriverLayer;
+using HDL_ON.UI.Music;
+using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
+using HDL_ON.UI.UI2.Intelligence.Automation;
+using System.Linq;
+using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
+
+namespace HDL_ON.UI.UI2.FuntionControlView.Aks
+{
+ public class SxqPage : FrameLayout
+ {
+ /// <summary>
+ /// 澶撮儴甯冨眬
+ /// </summary>
+ private TopView topView;
+ /// <summary>
+ /// 鍒犻櫎璁惧鍚庨渶瑕佹洿鏂扮晫闈㈢殑鍥炶皟
+ /// </summary>
+ public Action action;
+
+
+ public VerticalScrolViewLayout vv;
+ public SxqPage()
+ {
+ }
+ public void Show()
+ {
+ //鍒濆鍖朥I
+ this.InitTop();
+ this.InitMiddle();
+ //鍒濆鍖栦簨浠�
+ this.EventListener();
+ //璇诲彇鏁版嵁
+
+ }
+
+
+ /// <summary>
+ /// 鍒濆鍖栧ご閮ㄧ晫闈�
+ /// </summary>
+ private void InitTop()
+ {
+ this.BackgroundColor = MusicColor.ViewColor;
+ this.topView = new TopView();
+ this.topView.setBtn.Visible = false;
+ this.topView.topNameBtn.TextID = StringId.shixuqi;
+ this.AddChidren(topView.TopFLayoutView());
+ }
+ /// <summary>
+ /// 鍒濆鍖栦腑閮ㄧ晫闈�
+ /// </summary>
+ private void InitMiddle()
+ {
+ vv = new VerticalScrolViewLayout()
+ {
+ Y = topView.fLayout.Bottom,
+ Height = Application.GetRealHeight(H_W.H - H_W.T_Height),
+ BackgroundColor = MusicColor.WhiteColor,
+ };
+ this.AddChidren(vv);
+ BaseFramLayout fLayout = new BaseFramLayout();
+ this.vv.AddChidren(fLayout);
+ var mList = new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 };
+ int line = 0;
+ int xCount = 0;
+ int rowNumber = 4;
+ for (int i = 1; i <= mList.Count; i++)
+ {
+ VerticalBoutonFLayout buttonFram = new VerticalBoutonFLayout();
+ buttonFram.AddView(fLayout);
+ buttonFram.Tag = i - 1;
+ buttonFram.Y = Application.GetRealWidth(16)+ Application.GetRealHeight((VerticalBoutonFLayout.heightFrameLayout+16) * line);
+ buttonFram.X = Application.GetRealWidth(16) + Application.GetRealWidth((VerticalBoutonFLayout.widthFrameLayout+8) * xCount);
+ xCount++;
+ if (i % rowNumber == 0)
+ {
+ line++;
+ xCount = 0;
+ }
+ buttonFram.SetONClickListener((fl, btn) =>
+ {
+ //action.Invoke((int)buttonFram.Tag);
+ });
+ buttonFram.SetOFFClickListener((fl, btn) =>
+ {
+ //action.Invoke((int)buttonFram.Tag);
+ });
+
+
+ }
+ fLayout.AdjustRealHeight(16);
+
+ List<string> list = new List<string>() {
+ "A","B","C","D"
+ };
+ for (int i = 0; i < list.Count; i++)
+ {
+ Button btnName = new Button
+ {
+ Y = fLayout.Height,
+ X = Application.GetRealWidth(16) + Application.GetRealWidth((VerticalBoutonFLayout.widthFrameLayout+8) * i),
+ Width = Application.GetRealWidth(80),
+ Height = Application.GetRealHeight(44),
+ TextSize = TextSize.Text14,
+ TextColor = MusicColor.TextColor,
+ TextAlignment = TextAlignment.Center,
+ Text = list[i],
+ BackgroundColor = MusicColor.ViewColor,
+ Radius = (uint)Application.GetRealHeight(12),
+ };
+ fLayout.AddChidren(btnName);
+ }
+ fLayout.AdjustRealHeight(16);
+ }
+ /// <summary>
+ /// 娉ㄥ唽浜嬩欢
+ /// </summary>
+ private void EventListener()
+ {
+ //杩斿洖
+ this.topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
+ {
+ this.RemoveFromParent();
+ };
+ }
+ }
+}
--
Gitblit v1.8.0