From 44d6b49d86f8c531cbed718a8c109f3bc2db2177 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 09 八月 2023 16:27:23 +0800
Subject: [PATCH] 2023年08月09日16:27:16

---
 HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs  |    4 
 HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs                     |   20 ++
 HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs                      |   21 ++
 HDL_ON/UI/UI2/FuntionControlView/Aks/SxqPage.cs                     |   88 ++++++++++--
 HDL_ON/UI/UI2/FuntionControlView/Aks/TvPage.cs                      |   20 ++
 HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs |    2 
 HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs                   |   31 +++-
 HDL_ON/UI/UI2/FuntionControlView/Aks/TyyPage.cs                     |   20 ++
 HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs                     |   42 +++++
 HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs             |  100 +++++++-------
 HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs                     |   21 ++
 11 files changed, 279 insertions(+), 90 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs
index 65536cf..25caea1 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs
@@ -55,28 +55,28 @@
         {
             List<KeypadEntity> keypads = new List<KeypadEntity>();
             string aksIcon = "AksIcon/";
-            keypads.Add(new KeypadEntity { keypad = "on", name = "寮�", localIconAddress = $"{aksIcon}kai" });
-            keypads.Add(new KeypadEntity { keypad = "off", name = "鍏�", localIconAddress = $"{aksIcon}guan" });
-            keypads.Add(new KeypadEntity { keypad = "menu", name = "鑿滃崟", localIconAddress = $"{aksIcon}caidan" });
-            keypads.Add(new KeypadEntity { keypad = "return", name = "杩斿洖", localIconAddress = $"{aksIcon}fanhui" });
-            keypads.Add(new KeypadEntity { keypad = "sound_channel", name = "澹伴亾", localIconAddress = $"{aksIcon}shengdao" });
-            keypads.Add(new KeypadEntity { keypad = "volume_up", name = "闊抽噺+", localIconAddress = $"{aksIcon}yinliangjia" });
-            keypads.Add(new KeypadEntity { keypad = "volume_down", name = "闊抽噺-", localIconAddress = $"{aksIcon}yinliangjian" });
-            keypads.Add(new KeypadEntity { keypad = "mute", name = "闈欓煶", localIconAddress = $"{aksIcon}jingyin" });
-            keypads.Add(new KeypadEntity { keypad = "part_up", name = "涓婁竴閮�", localIconAddress = $"{aksIcon}shangyibu" });
-            keypads.Add(new KeypadEntity { keypad = "part_down", name = "涓嬩竴閮�", localIconAddress = $"{aksIcon}xiayibu" });
-            keypads.Add(new KeypadEntity { keypad = "fast_rewind", name = "蹇��", localIconAddress = $"{aksIcon}kuaitui" });
-            keypads.Add(new KeypadEntity { keypad = "fast_forward", name = "蹇繘", localIconAddress = $"{aksIcon}kuaijin" });
-            keypads.Add(new KeypadEntity { keypad = "stop", name = "鍋滄", localIconAddress = $"{aksIcon}tingzhi" });
-            keypads.Add(new KeypadEntity { keypad = "pause", name = "鏆傚仠", localIconAddress = $"{aksIcon}zanting" });
-            keypads.Add(new KeypadEntity { keypad = "play", name = "鎾斁", localIconAddress = $"{aksIcon}bofang" });
-            keypads.Add(new KeypadEntity { keypad = "in_out_warehouse", name = "杩涘嚭浠�", localIconAddress = $"{aksIcon}jinchucang" });
-            keypads.Add(new KeypadEntity { keypad = "subtitle", name = "瀛楀箷", localIconAddress = $"{aksIcon}zimu" });
-            keypads.Add(new KeypadEntity { keypad = "key_up", name = "涓�", localIconAddress = $"{aksIcon}shang" });
-            keypads.Add(new KeypadEntity { keypad = "key_down", name = "涓�", localIconAddress = $"{aksIcon}xia" });
-            keypads.Add(new KeypadEntity { keypad = "key_left", name = "宸�", localIconAddress = $"{aksIcon}zuo" });
-            keypads.Add(new KeypadEntity { keypad = "key_right", name = "鍙�", localIconAddress = $"{aksIcon}you" });
-            keypads.Add(new KeypadEntity { keypad = "key_ok", name = "纭", localIconAddress = $"{aksIcon}ok" });
+            keypads.Add(new KeypadEntity { keypad = "on", name = "寮�", localIconAddress = $"{aksIcon}kai.png" });
+            keypads.Add(new KeypadEntity { keypad = "off", name = "鍏�", localIconAddress = $"{aksIcon}guan.png" });
+            keypads.Add(new KeypadEntity { keypad = "menu", name = "鑿滃崟", localIconAddress = $"{aksIcon}caidan.png" });
+            keypads.Add(new KeypadEntity { keypad = "return", name = "杩斿洖", localIconAddress = $"{aksIcon}fanhui.png" });
+            keypads.Add(new KeypadEntity { keypad = "sound_channel", name = "澹伴亾", localIconAddress = $"{aksIcon}shengdao.png" });
+            keypads.Add(new KeypadEntity { keypad = "volume_up", name = "闊抽噺+", localIconAddress = $"{aksIcon}yinliangjia.png" });
+            keypads.Add(new KeypadEntity { keypad = "volume_down", name = "闊抽噺-", localIconAddress = $"{aksIcon}yinliangjian.png" });
+            keypads.Add(new KeypadEntity { keypad = "mute", name = "闈欓煶", localIconAddress = $"{aksIcon}jingyin.png" });
+            keypads.Add(new KeypadEntity { keypad = "part_up", name = "涓婁竴閮�", localIconAddress = $"{aksIcon}shangyibu.png" });
+            keypads.Add(new KeypadEntity { keypad = "part_down", name = "涓嬩竴閮�", localIconAddress = $"{aksIcon}xiayibu.png" });
+            keypads.Add(new KeypadEntity { keypad = "fast_rewind", name = "蹇��", localIconAddress = $"{aksIcon}kauitui.png" });
+            keypads.Add(new KeypadEntity { keypad = "fast_forward", name = "蹇繘", localIconAddress = $"{aksIcon}kuaijin.png" });
+            keypads.Add(new KeypadEntity { keypad = "stop", name = "鍋滄", localIconAddress = $"{aksIcon}tingzhi.png" });
+            keypads.Add(new KeypadEntity { keypad = "pause", name = "鏆傚仠", localIconAddress = $"{aksIcon}zanting.png" });
+            keypads.Add(new KeypadEntity { keypad = "play", name = "鎾斁", localIconAddress = $"{aksIcon}bofang.png" });
+            keypads.Add(new KeypadEntity { keypad = "in_out_warehouse", name = "杩涘嚭浠�", localIconAddress = $"{aksIcon}jinchucang.png" });
+            keypads.Add(new KeypadEntity { keypad = "subtitle", name = "瀛楀箷", localIconAddress = $"{aksIcon}zimu.png" });
+            keypads.Add(new KeypadEntity { keypad = "key_up", name = "涓�", localIconAddress = $"{aksIcon}shang.png" });
+            keypads.Add(new KeypadEntity { keypad = "key_down", name = "涓�", localIconAddress = $"{aksIcon}xia.png" });
+            keypads.Add(new KeypadEntity { keypad = "key_left", name = "宸�", localIconAddress = $"{aksIcon}zuo.png" });
+            keypads.Add(new KeypadEntity { keypad = "key_right", name = "鍙�", localIconAddress = $"{aksIcon}you.png" });
+            keypads.Add(new KeypadEntity { keypad = "key_ok", name = "纭", localIconAddress = $"{aksIcon}ok.png" });
             return keypads;
         }
         /// <summary>
@@ -87,18 +87,18 @@
         {
             List<KeypadEntity> keypads = new List<KeypadEntity>();
             string aksIcon = "AksIcon/";
-            keypads.Add(new KeypadEntity { keypad = "on", name = "寮�", localIconAddress = $"{aksIcon}kai" });
-            keypads.Add(new KeypadEntity { keypad = "off", name = "鍏�", localIconAddress = $"{aksIcon}guan" });
-            keypads.Add(new KeypadEntity { keypad = "volume_up", name = "闊抽噺+", localIconAddress = $"{aksIcon}yinliangjia" });
-            keypads.Add(new KeypadEntity { keypad = "volume_down", name = "闊抽噺-", localIconAddress = $"{aksIcon}yinliangjian" });
-            keypads.Add(new KeypadEntity { keypad = "HDMI_", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi" });
-            keypads.Add(new KeypadEntity { keypad = "HDMI_2", name = "HDMI 2", localIconAddress = $"{aksIcon}hdmi" });
-            keypads.Add(new KeypadEntity { keypad = "HDMI_3", name = "HDMI 3", localIconAddress = $"{aksIcon}hdmi" });
-            keypads.Add(new KeypadEntity { keypad = "HDMI_4", name = "HDMI 4", localIconAddress = $"{aksIcon}hdmi" });
-            keypads.Add(new KeypadEntity { keypad = "custom_1", name = "鑷畾涔夋寜閿�1", localIconAddress = $"{aksIcon}zdyanjian" });
-            keypads.Add(new KeypadEntity { keypad = "custom_2", name = "鑷畾涔夋寜閿�2", localIconAddress = $"{aksIcon}zdyanjian" });
-            keypads.Add(new KeypadEntity { keypad = "custom_3", name = "鑷畾涔夋寜閿�3", localIconAddress = $"{aksIcon}zdyanjian" });
-            keypads.Add(new KeypadEntity { keypad = "custom_4", name = "鑷畾涔夋寜閿�4", localIconAddress = $"{aksIcon}zdyanjian" });
+            keypads.Add(new KeypadEntity { keypad = "on", name = "寮�", localIconAddress = $"{aksIcon}kai.png" });
+            keypads.Add(new KeypadEntity { keypad = "off", name = "鍏�", localIconAddress = $"{aksIcon}guan.png" });
+            keypads.Add(new KeypadEntity { keypad = "volume_up", name = "闊抽噺+", localIconAddress = $"{aksIcon}yinliangjia.png" });
+            keypads.Add(new KeypadEntity { keypad = "volume_down", name = "闊抽噺-", localIconAddress = $"{aksIcon}yinliangjian.png" });
+            keypads.Add(new KeypadEntity { keypad = "HDMI_", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi.png" });
+            keypads.Add(new KeypadEntity { keypad = "HDMI_2", name = "HDMI 2", localIconAddress = $"{aksIcon}hdmi.png" });
+            keypads.Add(new KeypadEntity { keypad = "HDMI_3", name = "HDMI 3", localIconAddress = $"{aksIcon}hdmi.png" });
+            keypads.Add(new KeypadEntity { keypad = "HDMI_4", name = "HDMI 4", localIconAddress = $"{aksIcon}hdmi.png" });
+            keypads.Add(new KeypadEntity { keypad = "custom_1", name = "鑷畾涔夋寜閿�1", localIconAddress = $"{aksIcon}zdyanjian.png" });
+            keypads.Add(new KeypadEntity { keypad = "custom_2", name = "鑷畾涔夋寜閿�2", localIconAddress = $"{aksIcon}zdyanjian.png" });
+            keypads.Add(new KeypadEntity { keypad = "custom_3", name = "鑷畾涔夋寜閿�3", localIconAddress = $"{aksIcon}zdyanjian.png" });
+            keypads.Add(new KeypadEntity { keypad = "custom_4", name = "鑷畾涔夋寜閿�4", localIconAddress = $"{aksIcon}zdyanjian.png" });
             return keypads;
         }
 
@@ -110,23 +110,23 @@
         {
             List<KeypadEntity> keypads = new List<KeypadEntity>();
             string aksIcon = "AksIcon/";
-            keypads.Add(new KeypadEntity { keypad = "on", name = "寮�", localIconAddress = $"{aksIcon}kai" });
-            keypads.Add(new KeypadEntity { keypad = "off", name = "鍏�", localIconAddress = $"{aksIcon}guan" });
-            keypads.Add(new KeypadEntity { keypad = "signal_source", name = "淇″彿婧�", localIconAddress = $"{aksIcon}xinhaoyuan" });
-            keypads.Add(new KeypadEntity { keypad = "curtain_up", name = "骞曞竷鍗�", localIconAddress = $"{aksIcon}mubusheng" });
+            keypads.Add(new KeypadEntity { keypad = "on", name = "寮�", localIconAddress = $"{aksIcon}kai.png" });
+            keypads.Add(new KeypadEntity { keypad = "off", name = "鍏�", localIconAddress = $"{aksIcon}guan.png" });
+            keypads.Add(new KeypadEntity { keypad = "signal_source", name = "淇″彿婧�", localIconAddress = $"{aksIcon}xinhaoyuan.png" });
+            keypads.Add(new KeypadEntity { keypad = "curtain_up", name = "骞曞竷鍗�", localIconAddress = $"{aksIcon}mubusheng.png" });
             keypads.Add(new KeypadEntity { keypad = "curtain_down", name = "骞曞竷闄�", localIconAddress = $"{aksIcon}mubujiang.png" });
-            keypads.Add(new KeypadEntity { keypad = "HDMI_", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi" });
-            keypads.Add(new KeypadEntity { keypad = "HDMI_2", name = "HDMI 2", localIconAddress = $"{aksIcon}hdmi" });
-            keypads.Add(new KeypadEntity { keypad = "HDMI_3", name = "HDMI 3", localIconAddress = $"{aksIcon}hdmi" });
-            keypads.Add(new KeypadEntity { keypad = "HDMI_4", name = "HDMI 4", localIconAddress = $"{aksIcon}hdmi" });
-            keypads.Add(new KeypadEntity { keypad = "volume_up", name = "闊抽噺+", localIconAddress = $"{aksIcon}yinliangjia" });
-            keypads.Add(new KeypadEntity { keypad = "volume_down", name = "闊抽噺-", localIconAddress = $"{aksIcon}yinliangjian" });
-            keypads.Add(new KeypadEntity { keypad = "menu", name = "鑿滃崟", localIconAddress = $"{aksIcon}caidan" });
-            keypads.Add(new KeypadEntity { keypad = "return", name = "杩斿洖", localIconAddress = $"{aksIcon}fanhui" });
-            keypads.Add(new KeypadEntity { keypad = "custom_1", name = "鑷畾涔夋寜閿�1", localIconAddress = $"{aksIcon}zdyanjian" });
-            keypads.Add(new KeypadEntity { keypad = "custom_2", name = "鑷畾涔夋寜閿�2", localIconAddress = $"{aksIcon}zdyanjian" });
-            keypads.Add(new KeypadEntity { keypad = "custom_3", name = "鑷畾涔夋寜閿�3", localIconAddress = $"{aksIcon}zdyanjian" });
-            keypads.Add(new KeypadEntity { keypad = "custom_4", name = "鑷畾涔夋寜閿�4", localIconAddress = $"{aksIcon}zdyanjian" });
+            keypads.Add(new KeypadEntity { keypad = "HDMI_", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi.png" });
+            keypads.Add(new KeypadEntity { keypad = "HDMI_2", name = "HDMI 2", localIconAddress = $"{aksIcon}hdmi.png" });
+            keypads.Add(new KeypadEntity { keypad = "HDMI_3", name = "HDMI 3", localIconAddress = $"{aksIcon}hdmi.png" });
+            keypads.Add(new KeypadEntity { keypad = "HDMI_4", name = "HDMI 4", localIconAddress = $"{aksIcon}hdmi.png" });
+            keypads.Add(new KeypadEntity { keypad = "volume_up", name = "闊抽噺+", localIconAddress = $"{aksIcon}yinliangjia.png" });
+            keypads.Add(new KeypadEntity { keypad = "volume_down", name = "闊抽噺-", localIconAddress = $"{aksIcon}yinliangjian.png" });
+            keypads.Add(new KeypadEntity { keypad = "menu", name = "鑿滃崟", localIconAddress = $"{aksIcon}caidan.png" });
+            keypads.Add(new KeypadEntity { keypad = "return", name = "杩斿洖", localIconAddress = $"{aksIcon}fanhui.png" });
+            keypads.Add(new KeypadEntity { keypad = "custom_1", name = "鑷畾涔夋寜閿�1", localIconAddress = $"{aksIcon}zdyanjian.png" });
+            keypads.Add(new KeypadEntity { keypad = "custom_2", name = "鑷畾涔夋寜閿�2", localIconAddress = $"{aksIcon}zdyanjian.png" });
+            keypads.Add(new KeypadEntity { keypad = "custom_3", name = "鑷畾涔夋寜閿�3", localIconAddress = $"{aksIcon}zdyanjian.png" });
+            keypads.Add(new KeypadEntity { keypad = "custom_4", name = "鑷畾涔夋寜閿�4", localIconAddress = $"{aksIcon}zdyanjian.png" });
             return keypads;
         }
 
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
index 3c9bb3f..ac8a636 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
@@ -23,6 +23,10 @@
         /// 閬ユ帶鍣ㄥ垪琛�
         /// </summary>
         private List<RemoteControlEntity> remoteControlList;
+
+        /// 鏃跺簭鍣ㄥ垪琛�
+        /// </summary>
+        private List<SequencerEntity> sequencerList;
         /// <summary>
         /// 璁惧
         /// </summary>
@@ -179,6 +183,7 @@
                 try
                 {
                     this.remoteControlList = SendMethod.Current.GetRemoteControlLits(this.device.deviceId);
+                    this.sequencerList = SendMethod.Current.GetSequencerLits(this.device.deviceId);
                 }
                 catch { }
                 finally
@@ -228,7 +233,7 @@
             {
                 case IntType.Player:
                     {
-                        MusicPage musicPage = new MusicPage();
+                        MusicPage musicPage = new MusicPage(GetRemoteControl((int)IntType.Player),this.sequencerList);
                         this.vv.AddChidren(musicPage);
                         musicPage.Show();
                         musicPage.action += (type) =>
@@ -239,7 +244,7 @@
                     break;
                 case IntType.HiFi:
                     {
-                        GfPage gfPage = new GfPage();
+                        GfPage gfPage = new GfPage(GetRemoteControl((int)IntType.HiFi), this.sequencerList);
                         this.vv.AddChidren(gfPage);
                         gfPage.Show();
                         gfPage.action += (type) =>
@@ -252,7 +257,7 @@
                 case IntType.TV:
                     {
 
-                        TvPage tvPage = new TvPage();
+                        TvPage tvPage = new TvPage(GetRemoteControl((int)IntType.TV), this.sequencerList);
                         this.vv.AddChidren(tvPage);
                         tvPage.Show();
                         tvPage.action += (type) =>
@@ -263,7 +268,7 @@
                     break;
                 case IntType.STB:
                     {
-                        JdhPage jdhPage = new JdhPage();
+                        JdhPage jdhPage = new JdhPage(GetRemoteControl((int)IntType.STB), this.sequencerList);
                         this.vv.AddChidren(jdhPage);
                         jdhPage.Show();
                         jdhPage.action += (type) =>
@@ -274,7 +279,7 @@
                     break;
                 case IntType.Projector:
                     {
-                        TyyPage tyyPage = new TyyPage();
+                        TyyPage tyyPage = new TyyPage(GetRemoteControl((int)IntType.Projector), this.sequencerList);
                         this.vv.AddChidren(tyyPage);
                         tyyPage.Show();
                         tyyPage.action += (type) =>
@@ -286,7 +291,7 @@
                 case IntType.Control:
                     {
 
-                        YkqPage ykqPage = new YkqPage();
+                        YkqPage ykqPage = new YkqPage(GetRemoteControl((int)IntType.Control), this.sequencerList);
                         this.vv.AddChidren(ykqPage);
                         ykqPage.Show();
                         ykqPage.action += (type) =>
@@ -318,6 +323,27 @@
 
                });
         }
+
+        /// <summary>
+        /// 鏌ユ壘閬ユ帶鍣�
+        /// </summary>
+        /// <param name="type">(1 = 鎾斁鍣�,2 = 鍔熸斁,3 = 鐢佃,4 = 鏈洪《鐩�,5 = 鎶曞奖浠�,6 = 涓囪兘閬ユ帶鍣�)</param>
+        /// <returns>涓嶄細涓簄ull</returns>
+        private RemoteControlEntity GetRemoteControl(int type)
+        {
+            if (this.remoteControlList == null || this.remoteControlList.Count == 0)
+            {
+                return new RemoteControlEntity();
+            }
+            var re = this.remoteControlList.Find((o) => o.type == type);
+            if (re == null)
+            {
+                re = new RemoteControlEntity();
+            }
+            re.deviceId = this.device.deviceId;
+            return re;
+        }
+
 
         public enum IntType
         {
@@ -436,5 +462,9 @@
             return "";
         }
 
+
+        
+
+
     }
 }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs
index 9f4dac2..63c868a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs
@@ -104,6 +104,7 @@
                 {
                     buttonFram.AddBottomLine();
                 }
+                buttonFram.GetImageButton().UnSelectedImagePath = keypad.localIconAddress;
                 buttonFram.GetNameButton().Text = keypad.name;
 
                 xCount++;
@@ -167,6 +168,7 @@
                 buttonFram.AddImageView();
                 buttonFram.AddNameView();
                 buttonFram.Tag = keypad;//鏍囪鏁版嵁
+                buttonFram.GetImageButton().UnSelectedImagePath = keypad.localIconAddress;
                 buttonFram.GetNameButton().Text = keypad.name;
                 if (widthDimensionValue > Application.GetRealWidth(currnetWidthValue))
                 {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs
index 51dc9f0..467373a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs
@@ -10,6 +10,10 @@
     {
 
         /// <summary>
+        /// 鑷畾涔夌殑
+        /// </summary>
+        public string deviceId = string.Empty;
+        /// <summary>
         /// 1 = 鎾斁鍣�
         ///2 = 鍔熸斁
         ///3 = 鐢佃
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs
index b385592..0c297a2 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using HDL_ON.UI.Music;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
+using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
 using Shared;
 using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage;
 namespace HDL_ON.UI.UI2.FuntionControlView.Aks
@@ -11,10 +12,24 @@
 	/// </summary>
     public class GfPage : BaseFramLayout
     {
-        public GfPage()
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="remoteControlEntity">閬ユ帶鍣ㄥ璞�</param>
+        /// <param name="sequencerList">鏃跺簭鍣ㄥ垪琛�</param>
+        public GfPage(RemoteControlEntity remoteControlEntity, List<SequencerEntity> sequencerList)
         {
+            this.remoteControl = remoteControlEntity;
+            this.sequencerList = sequencerList;
         }
-
+        /// <summary>
+        /// 鏃跺簭鍣ㄥ垪琛�
+        /// </summary>
+        private List<SequencerEntity> sequencerList;
+        /// <summary>
+        /// 褰撳墠鐨勯仴鎺у櫒瀵硅薄
+        /// </summary>
+        private RemoteControlEntity remoteControl;
         public Action<IntType> action;
         CornerFramLayout cornerFram;
         TypeMultiFramLayout typeMultiFramLayout;
@@ -44,7 +59,7 @@
             //鏃跺簭鍣�
             typeMultiFramLayout.SetLeftFlClickListener((f) =>
             {
-                SxqPage sxqPage = new SxqPage();
+                SxqPage sxqPage = new SxqPage(this.sequencerList, this.remoteControl.deviceId);
                 MainPage.BasePageView.AddChidren(sxqPage);
                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                 sxqPage.Show();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs
index 6a3ce56..7d8ca90 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using HDL_ON.UI.Music;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
+using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
 using Shared;
 using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage;
 namespace HDL_ON.UI.UI2.FuntionControlView.Aks
@@ -11,11 +12,25 @@
     /// </summary>
     public class JdhPage:BaseFramLayout
     {
-        public JdhPage()
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="remoteControlEntity">閬ユ帶鍣ㄥ璞�</param>
+        /// <param name="sequencerList">鏃跺簭鍣ㄥ垪琛�</param>
+        public JdhPage(RemoteControlEntity remoteControlEntity, List<SequencerEntity> sequencerList)
         {
+            this.remoteControl = remoteControlEntity;
+            this.sequencerList = sequencerList;
         }
+        /// <summary>
+        /// 鏃跺簭鍣ㄥ垪琛�
+        /// </summary>
+        private List<SequencerEntity> sequencerList;
+        /// <summary>
+        /// 褰撳墠鐨勯仴鎺у櫒瀵硅薄
+        /// </summary>
+        private RemoteControlEntity remoteControl;
 
-        
         public Action<IntType> action;
         /// <summary>
         /// 鏈�涓婇潰鍔熻兘閿鍣�
@@ -94,7 +109,7 @@
             //鏃跺簭鍣�
             typeMultiFramLayout.SetLeftFlClickListener((f) =>
             {
-                SxqPage sxqPage = new SxqPage();
+                SxqPage sxqPage = new SxqPage(this.sequencerList,this.remoteControl.deviceId);
                 MainPage.BasePageView.AddChidren(sxqPage);
                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                 sxqPage.Show();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs
index 2aee513..ae0273e 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using HDL_ON.UI.Music;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
+using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
 using Shared;
 using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage;
 namespace HDL_ON.UI.UI2.FuntionControlView.Aks
@@ -11,12 +12,24 @@
     /// </summary>
     public class MusicPage : BaseFramLayout
     {
-        public MusicPage()
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="remoteControlEntity">閬ユ帶鍣ㄥ璞�</param>
+        /// <param name="sequencerList">鏃跺簭鍣ㄥ垪琛�</param>
+        public MusicPage(RemoteControlEntity remoteControlEntity, List<SequencerEntity> sequencerList)
         {
+            this.remoteControl = remoteControlEntity;
+            this.sequencerList = sequencerList;
         }
-
-
-
+        /// <summary>
+        /// 鏃跺簭鍣ㄥ垪琛�
+        /// </summary>
+        private List<SequencerEntity> sequencerList;
+        /// <summary>
+        /// 褰撳墠鐨勯仴鎺у櫒瀵硅薄
+        /// </summary>
+        private RemoteControlEntity remoteControl;
         public Action<IntType> action;
         CornerFramLayout cornerFram;
         TypeSingleFramLayout typeSingleFramLayout;
@@ -78,7 +91,7 @@
 
             typeMultiFramLayout.SetLeftFlClickListener((f) =>
             {
-                SxqPage sxqPage = new SxqPage();
+                SxqPage sxqPage = new SxqPage(this.sequencerList, this.remoteControl.deviceId);
                 MainPage.BasePageView.AddChidren(sxqPage);
                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                 sxqPage.Show();
@@ -105,7 +118,8 @@
                 TextAlignment = TextAlignment.CenterLeft,
                 TextColor = MusicColor.TextColor,
                 TextSize = TextSize.Text16,
-                TextID = StringId.bofangqi,
+                //TextID = StringId.bofangqi,
+                Text = this.remoteControl.name,
             };
             this.AddChidren(btnTitle);
 
@@ -114,7 +128,7 @@
             cornerFram.Y = btnTitle.Bottom + Application.GetRealHeight(16);
             this.AddChidren(cornerFram);
             cornerFram.SetMargin(16, 0, 16, 0);
-            cornerFram.LoadButtonPage(AksCommonMethod.Current.GetMusicKeypadList(),4);
+            cornerFram.LoadButtonPage(AksCommonMethod.Current.GetMusicKeypadList(), 4);
 
 
             CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 364, 17);
@@ -135,7 +149,8 @@
             typeMultiFramLayout = new TypeMultiFramLayout();
             typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32);
             typeMultiFramLayout.AddView(cornerBottomFram);
-            typeMultiFramLayout.btnBottonRightName.TextID = StringId.bofangqi;
+            //typeMultiFramLayout.btnBottonRightName.TextID = StringId.bofangqi;
+            typeMultiFramLayout.btnBottonRightName.Text = this.remoteControl.name;
 
             this.AdjustRealHeight(16);
         }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/SxqPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/SxqPage.cs
index a0bc204..1f0ce23 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/SxqPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/SxqPage.cs
@@ -9,6 +9,8 @@
 using HDL_ON.UI.UI2.Intelligence.Automation;
 using System.Linq;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
+using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
+using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
 
 namespace HDL_ON.UI.UI2.FuntionControlView.Aks
 {
@@ -28,8 +30,24 @@
 
 
         public VerticalScrolViewLayout vv;
-        public SxqPage()
+        /// <summary>
+        /// 鏃跺簭鍣ㄥ垪琛�
+        /// </summary>
+        private List<SequencerEntity> sequencerList;
+
+        /// <summary>
+        /// 璁惧id
+        /// </summary>
+        private string deviceId;
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="sequencerList">鏃跺簭鍣ㄥ垪琛�</param>
+        /// <param name="deviceId">璁惧id</param>
+        public SxqPage(List<SequencerEntity> sequencerList, string deviceId)
         {
+            this.sequencerList = sequencerList;
+            this.deviceId = deviceId;
         }
         public void Show()
         {
@@ -68,17 +86,20 @@
             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++)
+            var list1 = this.sequencerList.FindAll((o) => o.type == 1);
+            for (int i = 1; i <= list1.Count; i++)
             {
+                var sequencer = list1[i - 1];
+
                 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);
+                buttonFram.Tag = sequencer;
+                buttonFram.Y = Application.GetRealWidth(16) + Application.GetRealHeight((VerticalBoutonFLayout.heightFrameLayout + 16) * line);
+                buttonFram.X = Application.GetRealWidth(16) + Application.GetRealWidth((VerticalBoutonFLayout.widthFrameLayout + 8) * xCount);
+                buttonFram.btnName.Text = sequencer.name;
                 xCount++;
                 if (i % rowNumber == 0)
                 {
@@ -87,34 +108,59 @@
                 }
                 buttonFram.SetONClickListener((fl, btn) =>
                 {
-                    //action.Invoke((int)buttonFram.Tag);
+                    if (buttonFram.Tag != null || buttonFram.Tag is SequencerEntity)
+                    {
+
+                        var sequ = (SequencerEntity)buttonFram.Tag;
+                        SequencerControlExecute(sequ.seqId, "on");
+                    }
+
                 });
                 buttonFram.SetOFFClickListener((fl, btn) =>
                 {
-                    //action.Invoke((int)buttonFram.Tag);
+                    if (buttonFram.Tag != null || buttonFram.Tag is SequencerEntity)
+                    {
+                        var sequ = (SequencerEntity)buttonFram.Tag;
+                        SequencerControlExecute(sequ.seqId, "off");
+                    }
                 });
 
 
             }
             fLayout.AdjustRealHeight(16);
 
-            List<string> list = new List<string>() {
-             "A","B","C","D"
-            };
-            for (int i = 0; i < list.Count; i++)
+            var list2 = this.sequencerList.FindAll((o) => o.type == 2);
+            for (int i = 0; i < list2.Count; i++)
             {
                 Button btnName = new Button
                 {
                     Y = fLayout.Height,
-                    X = Application.GetRealWidth(16) + Application.GetRealWidth((VerticalBoutonFLayout.widthFrameLayout+8) * i),
+                    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],
+                    Text = list2[i].name,
                     BackgroundColor = MusicColor.ViewColor,
+                    SelectedBackgroundColor = MusicColor.MusicTxet14SelectedColor,
                     Radius = (uint)Application.GetRealHeight(12),
+                    Padding=new Padding(0,5,0,5),
+                    Tag = list2[i]
+                };
+                btnName.MouseDownEventHandler += (sen, e) =>
+                {
+                    btnName.IsSelected = true;
+                    if (btnName.Tag != null || btnName.Tag is SequencerEntity)
+                    {
+                        var sequ = (SequencerEntity)btnName.Tag;
+                        SequencerControlExecute(sequ.seqId, "on");
+                    }
+                };
+                btnName.MouseUpEventHandler += (sen, e) =>
+                {
+                    btnName.IsSelected = false;
+                    //寮硅捣棰滆壊
                 };
                 fLayout.AddChidren(btnName);
             }
@@ -131,5 +177,19 @@
                 this.RemoveFromParent();
             };
         }
+
+        /// <summary>
+        /// 鏃跺簭鍣ㄦ寚浠ゅ彂閫�
+        /// </summary>
+        /// <param name="seqId">鏃跺簭鍣╥d</param>
+        /// <param name="onOff">鏃跺簭鍣ㄥ紑鍏�</param>
+        private void SequencerControlExecute(string seqId, string onOff)
+        {
+            CommonMethod.Current.SunThread(() =>
+            {
+                SendMethod.Current.SequencerExecute(this.deviceId, seqId, onOff);
+            });
+        }
+
     }
 }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/TvPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/TvPage.cs
index 1aa4786..30765ca 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/TvPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/TvPage.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using HDL_ON.UI.Music;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
+using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
 using Shared;
 using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage;
 namespace HDL_ON.UI.UI2.FuntionControlView.Aks
@@ -11,9 +12,24 @@
     /// </summary>
     public class TvPage : BaseFramLayout
     {
-        public TvPage()
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="remoteControlEntity">閬ユ帶鍣ㄥ璞�</param>
+        /// <param name="sequencerList">鏃跺簭鍣ㄥ垪琛�</param>
+        public TvPage(RemoteControlEntity remoteControlEntity, List<SequencerEntity> sequencerList)
         {
+            this.remoteControl = remoteControlEntity;
+            this.sequencerList = sequencerList;
         }
+        /// <summary>
+        /// 鏃跺簭鍣ㄥ垪琛�
+        /// </summary>
+        private List<SequencerEntity> sequencerList;
+        /// <summary>
+        /// 褰撳墠鐨勯仴鎺у櫒瀵硅薄
+        /// </summary>
+        private RemoteControlEntity remoteControl;
         public Action<IntType> action;
         /// <summary>
         /// 鏈�涓婇潰鍔熻兘閿鍣�
@@ -92,7 +108,7 @@
             //鏃跺簭鍣�
             typeMultiFramLayout.SetLeftFlClickListener((f) =>
             {
-                SxqPage sxqPage = new SxqPage();
+                SxqPage sxqPage = new SxqPage(this.sequencerList,this.remoteControl.deviceId);
                 MainPage.BasePageView.AddChidren(sxqPage);
                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                 sxqPage.Show();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/TyyPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/TyyPage.cs
index 8933aa9..cf64a26 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/TyyPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/TyyPage.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using HDL_ON.UI.Music;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
+using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
 using Shared;
 using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage;
 namespace HDL_ON.UI.UI2.FuntionControlView.Aks
@@ -11,9 +12,24 @@
     /// </summary>
     public class TyyPage : BaseFramLayout
     {
-        public TyyPage()
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="remoteControlEntity">閬ユ帶鍣ㄥ璞�</param>
+        /// <param name="sequencerList">鏃跺簭鍣ㄥ垪琛�</param>
+        public TyyPage(RemoteControlEntity remoteControlEntity, List<SequencerEntity> sequencerList)
         {
+            this.remoteControl = remoteControlEntity;
+            this.sequencerList = sequencerList;
         }
+        /// <summary>
+        /// 鏃跺簭鍣ㄥ垪琛�
+        /// </summary>
+        private List<SequencerEntity> sequencerList;
+        /// <summary>
+        /// 褰撳墠鐨勯仴鎺у櫒瀵硅薄
+        /// </summary>
+        private RemoteControlEntity remoteControl;
         public Action<IntType> action;
         CornerFramLayout cornerTopFram;
         MenuFramLayout menuFram;
@@ -77,7 +93,7 @@
             //鏃跺簭鍣�
             typeMultiFramLayout.SetLeftFlClickListener((f) =>
             {
-                SxqPage sxqPage = new SxqPage();
+                SxqPage sxqPage = new SxqPage(this.sequencerList, this.remoteControl.deviceId);
                 MainPage.BasePageView.AddChidren(sxqPage);
                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                 sxqPage.Show();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
index 36d44a3..4c96121 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using HDL_ON.UI.Music;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
+using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
 using Shared;
 using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage;
 namespace HDL_ON.UI.UI2.FuntionControlView.Aks
@@ -11,9 +12,24 @@
     /// </summary>
     public class YkqPage : BaseFramLayout
     {
-        public YkqPage()
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="remoteControlEntity">閬ユ帶鍣ㄥ璞�</param>
+        /// <param name="sequencerList">鏃跺簭鍣ㄥ垪琛�</param>
+        public YkqPage(RemoteControlEntity remoteControlEntity, List<SequencerEntity> sequencerList)
         {
+            this.remoteControl = remoteControlEntity;
+            this.sequencerList = sequencerList;
         }
+        /// <summary>
+        /// 鏃跺簭鍣ㄥ垪琛�
+        /// </summary>
+        private List<SequencerEntity> sequencerList;
+        /// <summary>
+        /// 褰撳墠鐨勯仴鎺у櫒瀵硅薄
+        /// </summary>
+        private RemoteControlEntity remoteControl;
         public Action<IntType> action;
         /// <summary>
         /// 鍒囨崲璁惧瀹瑰櫒
@@ -306,7 +322,7 @@
             //鏃跺簭鍣�
             typeMultiFramLayout.SetLeftFlClickListener((f) =>
             {
-                SxqPage sxqPage = new SxqPage();
+                SxqPage sxqPage = new SxqPage(this.sequencerList,this.remoteControl.deviceId);
                 MainPage.BasePageView.AddChidren(sxqPage);
                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                 sxqPage.Show();

--
Gitblit v1.8.0